public
Created

MonsterWM init script

  • Download Gist
mwminit.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
while read -t 60 -r wmout || true; do
unset up
unset music
up=[$(checkupdates | wc -l)]
music=[$(cmus.sh)]
if [[ $wmout =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]]; then
unset r
read -ra desktops <<< "$wmout"
for desktop in "${desktops[@]}"; do
IFS=':' read -r d w m c u <<< "$desktop"
((c)) && fg="1" bg="0" lc="\u1 " rc=" \ur" i="${ms[$m]}" || fg="8" bg="0" lc=" " rc=" "
((w)) && ((! c)) && fg="1" bg="0" lc="\ur " rc=" \ur"
((u)) && fg="7" bg="0" lc="\u7 " rc=" \ur"
r+="\f$fg\b$bg$lc${ds[$d]}$rc\fr\br"
done
fi
printf "\\\l%s\\\r%s\n" "$r \r\f2\b0$music \f6\b0$up \f5\b0$i" "$(date "+\c\f3\b0 %I:%M") "
done < "$ff" | bar &
 
monsterwm > "$ff"
rm $ff

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.