Browse Source

Cleaned up and fixed centering in panel output script.

master
Daniel Sissom 5 years ago
parent
commit
c75b1e43da
Signed by untrusted user who does not match committer: djsissom GPG Key ID: 2C30FFB796852389
1 changed files with 8 additions and 12 deletions
  1. + 8
    - 12
      bspwm/panel/panel_bar

+ 8
- 12
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

Loading…
Cancel
Save