tbeepop - scripts - random scripts
HTML git clone https://git.parazyd.org/scripts
DIR Log
DIR Files
DIR Refs
---
tbeepop (519B)
---
1 #!/bin/sh
2
3 default_geometry() {
4 x=$(wattr w `lsw -r`)
5 y=$(wattr h `lsw -r`)
6
7 width=1136
8 height=28
9
10 offy=44
11 offx=$(( x - $width - 210 ))
12
13 echo "${width}x${height}+${offx}+${offy}"
14 }
15
16 FIFO=/tmp/beepop.fifo
17 GEOM=$(default_geometry)
18 SLEEP=3
19
20 case $(basename $0) in
21 beepop)
22 test -p $FIFO || mkfifo $FIFO
23
24 tail -f $FIFO | while read LINE; do
25 (
26 echo "%{r}$LINE %{F${HL}}"
27 sleep $SLEEP
28 ) | lemonbar -d -g "$GEOM"
29 done
30 ;;
31 popup)
32 echo "%{c}%{F#333333}%{B#e84f4f} $* %{F-}%{B-}" > $FIFO
33 ;;
34 esac