Skip to content

Instantly share code, notes, and snippets.

@robstwd

robstwd/wmrun.sh

Created Aug 21, 2013
Embed
What would you like to do?
monsterwm invoked via this script
#!/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