From c75b1e43daf3cf34aeace6f86c356c56460d0b96 Mon Sep 17 00:00:00 2001 From: Daniel Sissom Date: Mon, 15 Jul 2019 17:33:51 -0500 Subject: [PATCH] Cleaned up and fixed centering in panel output script. --- bspwm/panel/panel_bar | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/bspwm/panel/panel_bar b/bspwm/panel/panel_bar index e43a84e..90ec337 100755 --- a/bspwm/panel/panel_bar +++ b/bspwm/panel/panel_bar @@ -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