Created
April 18, 2013 04:50
-
-
Save benmills/5410214 to your computer and use it in GitHub Desktop.
Simple dzen panel for bspwm
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
#!/bin/bash | |
while true; do | |
if read line < $PANEL_FIFO; then | |
wm_status="" | |
IFS=':' read -a array <<< "$line" | |
for element in "${array[@]}"; do | |
if [[ $element =~ ^D ]]; then | |
wm_status="$wm_status ^fg(white)${element:1}" | |
elif [[ $element =~ ^d ]]; then | |
wm_status="$wm_status ^ca(1, bspc use ${element:1})^fg(darkgray)${element:1}^ca()" | |
elif [[ $element =~ ^E ]]; then | |
wm_status="$wm_status ^ca(1, bspc use ${element:1})^fg(#6b6b6b)${element:1}^ca()" | |
elif [[ $element =~ ^L ]]; then | |
wm_status="$wm_status • ^ca(1, bspc cycle_layout)^fg(white)${element:1}^ca()" | |
fi | |
done | |
echo $wm_status | |
fi | |
done |
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
bspwm_dzen.sh | dzen2 -p -ta l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment