-
Notifications
You must be signed in to change notification settings - Fork 0
/
monster.dzen2-1.bak
executable file
·35 lines (31 loc) · 1.34 KB
/
monster.dzen2-1.bak
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
#!/bin/sh
xsetroot -cursor_name left_ptr &
#sleep 2 && conky -c ~/.conkyrc_dzen | dzen2 -e 'button3=' -p -expand left &>/dev/null &
#sleep 3 && fbpanel &
: "${wm:=monsterwm}"
: "${ff:="/tmp/${wm}.fifo"}"
[[ -p $ff ]] || mkfifo -m 600 "$ff"
while read -r; do
[[ $REPLY =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]] && read -ra desktops <<< "$REPLY" || continue
for desktop in "${desktops[@]}"; do
IFS=':' read -r d w m c u <<< "$desktop"
case $d in
0) d="PR0N" s="" ;;
1) d="VÅLD" s="" ;;
2) d="KNARK" s="" ;;
3) d="IRC" s="" ;;
4) d="irc" s="" ;;
5) d="foo " s="" ;;
esac
((c)) && f="#C7F09F" && case $m in
0) i="^fg(#404040)^i(/home/simon/.icons/st/tile.xbm)^fg()" ;;
1) i="^fg(#404040)^i(/home/simon/.icons/st/monocle.xbm)^fg()" ;;
2) i="^fg(#404040)^i(/home/simon/.icons/st/bstack.xbm)^fg()" ;;
3) i="^fg(#404040)^i(/home/simon/.icons/st/grid.xbm)^fg()";;
esac || f="#414141"
((u)) && f="#87afd7"
((w)) && r+="$s^fg($f)^i(/home/simon/.dzen/icons/has_win_nv.xbm)$d^fg() " || r+="$s^fg($f) $d^fg() "
done
printf "%s%s\n" "$r" "^fg(#808080)$i" && unset r
done < "$ff" | dzen2 -ta l -bg "#080808" -fg "#808080" -w 200 -p -fn "Cuprum:bold:pixelsize=10" &
while :; do "$wm" || break; done | tee -a "$ff"