|
|
@ -1,18 +1,20 @@ |
|
|
|
#! /bin/sh |
|
|
|
# |
|
|
|
# Example panel for LemonBoy's bar |
|
|
|
# Panel output config for lemonbar |
|
|
|
|
|
|
|
while read -r line ; do |
|
|
|
case $line in |
|
|
|
S*) |
|
|
|
sys_infos="%{r}%{F-}${line#?}%{F-}" |
|
|
|
# clock output |
|
|
|
sys_infos="%{F-}${line#?}%{F-}" |
|
|
|
;; |
|
|
|
T*) |
|
|
|
title="%{F-} ${line#?}" |
|
|
|
# title="" |
|
|
|
# xtitle output |
|
|
|
title="%{F-}${line#?}%{F-}" |
|
|
|
;; |
|
|
|
W*) |
|
|
|
wm_infos="%{c}" |
|
|
|
# bspwm state |
|
|
|
wm_infos="" |
|
|
|
IFS=':' |
|
|
|
set -- ${line#?} |
|
|
|
while [ $# -gt 0 ] ; do |
|
|
@ -35,16 +37,10 @@ while read -r line ; do |
|
|
|
# urgent desktop |
|
|
|
wm_infos="$wm_infos%{F-} ● %{F-}" |
|
|
|
;; |
|
|
|
L*) |
|
|
|
# layout |
|
|
|
# layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/') |
|
|
|
layout="" |
|
|
|
wm_infos="$wm_infos %{B-}%{F-}$layout%{B-}%{F-}" |
|
|
|
;; |
|
|
|
esac |
|
|
|
shift |
|
|
|
done |
|
|
|
;; |
|
|
|
esac |
|
|
|
printf "%s\n" "%{S+} $title $wm_infos $sys_infos ⏻ " |
|
|
|
printf "%s\n" "%{S+}%{l} $title%{c}$wm_infos%{r}$sys_infos ⏻ " |
|
|
|
done |