forked from lwilletts/fyre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yawee.sh
executable file
·50 lines (41 loc) · 958 Bytes
/
yawee.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
#
# wildefyr & z3bra - 2015 (c) wtfpl
# catch window events from wew
. ~/.config/fyre/fyrerc
while IFS=: read ev wid; do
case $ev in
4)
if ! wattr o $wid; then
focus.sh $wid
fi
;;
16)
if ! wattr o $wid; then
$FYREDIR/winopen $wid
if [ $(lsw | wc -l) -eq 1 ]; then
blur.sh &
fi
fi
;;
18)
wattr $(pfw) || vroum.sh prev 2>/dev/null
if [ $(lsw | wc -l) -eq 0 ]; then
blur.sh 0 &
fi
;;
19)
if ! wattr o $wid; then
focus.sh $wid
if [ $(lsw | wc -l) -ne 0 ]; then
blur.sh &
fi
fi
;;
esac
case $1 in
d|debug)
printf '%s\n' "$ev"
;;
esac
done