Skip to content

Instantly share code, notes, and snippets.

@joetemp
Created November 2, 2016 20:31
Show Gist options
  • Select an option

  • Save joetemp/9ba2c69f1c8c6fa4d30196df53b92e63 to your computer and use it in GitHub Desktop.

Select an option

Save joetemp/9ba2c69f1c8c6fa4d30196df53b92e63 to your computer and use it in GitHub Desktop.
#!/bin/bash
num_mon=$(bspc query -M | wc -l)
while read -r line; do
case $line in
W*)
wm_infos=""
IFS=':'
set -- ${line#?}
while [ $# -gt 0 ];do
item=$1
name=${item#?}
case $item in
O*)
wm_infos="${wm_infos}%{F#b0db43}%{B#12eaea}%{U#db2763}%{+u} ${name} %{-u}%{B-}%{F-}"
;;
esac
shift
done
;;
esac
printf "%s\n" "%{c}${wm_infos}"
done < <(\
bspc subscribe & \
) | lemonbar -g 1920x18+1920+0 -p -B "#000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment