Created
August 21, 2013 12:16
-
-
Save robstwd/6293733 to your computer and use it in GitHub Desktop.
monsterwm invoked via this script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# from c00kiemon5ter's config here https://github.com/c00kiemon5ter/scripts/blob/master/wmrun.sh | |
# adapted for bipolarbar | |
: "${wm:=monsterwm}" | |
: "${ff:="/tmp/${wm}.fifo"}" | |
trap 'rm -f "$ff"' TERM INT EXIT | |
[ -p "$ff" ] || { rm -f "$ff"; mkfifo -m 600 "$ff"; } | |
# spawn a statusbar | |
while read -t 60 -r line || true; do | |
echo "$line" | grep -qEx "(([[:digit:]]+:){4,6}[[:digit:]]+ ?)+[|]?.*" && prev="$line" || line= | |
statusinfo.sh ${line:-$prev} | |
done < "$ff" | bipolarbar & | |
bipolarbar_status & | |
"$wm" > "$ff" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment