Skip to content

Instantly share code, notes, and snippets.

@robstwd
Created August 21, 2013 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robstwd/6293733 to your computer and use it in GitHub Desktop.
Save robstwd/6293733 to your computer and use it in GitHub Desktop.
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