|
|
@ -3,44 +3,44 @@ |
|
|
|
# Panel output config for lemonbar |
|
|
|
|
|
|
|
while read -r line ; do |
|
|
|
case $line in |
|
|
|
S*) |
|
|
|
case $line in |
|
|
|
S*) |
|
|
|
# clock output |
|
|
|
sys_infos="%{F-}${line#?}%{F-}" |
|
|
|
;; |
|
|
|
T*) |
|
|
|
sys_infos="%{F-}${line#?}%{F-}" |
|
|
|
;; |
|
|
|
T*) |
|
|
|
# xtitle output |
|
|
|
title="%{F-}${line#?}%{F-}" |
|
|
|
;; |
|
|
|
W*) |
|
|
|
title="%{F-}${line#?}%{F-}" |
|
|
|
;; |
|
|
|
W*) |
|
|
|
# bspwm state |
|
|
|
wm_infos="" |
|
|
|
IFS=':' |
|
|
|
set -- ${line#?} |
|
|
|
while [ $# -gt 0 ] ; do |
|
|
|
item=$1 |
|
|
|
name=${item#?} |
|
|
|
case $item in |
|
|
|
[OFU]*) |
|
|
|
# active desktop |
|
|
|
wm_infos="$wm_infos%{F#FAE7BF} ● %{F-}%{B-}" |
|
|
|
;; |
|
|
|
o*) |
|
|
|
# inactive but occupied desktop |
|
|
|
wm_infos="$wm_infos%{F-} ● %{F-}" |
|
|
|
;; |
|
|
|
f*) |
|
|
|
# inactive desktop |
|
|
|
wm_infos="$wm_infos%{F-} ○ %{F-}" |
|
|
|
;; |
|
|
|
u*) |
|
|
|
# urgent desktop |
|
|
|
wm_infos="$wm_infos%{F-} ● %{F-}" |
|
|
|
;; |
|
|
|
esac |
|
|
|
shift |
|
|
|
done |
|
|
|
;; |
|
|
|
esac |
|
|
|
printf "%s\n" "%{S+}%{l} $title%{c}$wm_infos%{r}$sys_infos ⏻ " |
|
|
|
wm_infos="" |
|
|
|
IFS=':' |
|
|
|
set -- ${line#?} |
|
|
|
while [ $# -gt 0 ] ; do |
|
|
|
item=$1 |
|
|
|
name=${item#?} |
|
|
|
case $item in |
|
|
|
[OFU]*) |
|
|
|
# active desktop |
|
|
|
wm_infos="$wm_infos%{F#FAE7BF} ● %{F-}%{B-}" |
|
|
|
;; |
|
|
|
o*) |
|
|
|
# inactive but occupied desktop |
|
|
|
wm_infos="$wm_infos%{F-} ● %{F-}" |
|
|
|
;; |
|
|
|
f*) |
|
|
|
# inactive desktop |
|
|
|
wm_infos="$wm_infos%{F-} ○ %{F-}" |
|
|
|
;; |
|
|
|
u*) |
|
|
|
# urgent desktop |
|
|
|
wm_infos="$wm_infos%{F-} ● %{F-}" |
|
|
|
;; |
|
|
|
esac |
|
|
|
shift |
|
|
|
done |
|
|
|
;; |
|
|
|
esac |
|
|
|
printf "%s\n" "%{S+}%{l} $title%{c}$wm_infos%{r}$sys_infos ⏻ " |
|
|
|
done |