From b0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Thu, 6 Aug 2015 20:26:32 +0200 Subject: switching back to ratpoison --- tools/panel/panel_bar | 77 +++++++++++++++++---------------------------------- 1 file changed, 25 insertions(+), 52 deletions(-) (limited to 'tools/panel/panel_bar') diff --git a/tools/panel/panel_bar b/tools/panel/panel_bar index 779c5bb..ab39edf 100755 --- a/tools/panel/panel_bar +++ b/tools/panel/panel_bar @@ -1,7 +1,4 @@ #! /bin/sh -# -# Example panel for LemonBoy's bar - num_mon=$(bspc query -M | wc -l) @@ -111,51 +108,31 @@ while read -r line ; do # clock output time_infos="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}" ;; - T*) - # xtitle output - title="%{F$COLOR_TITLE_FG}%{B$COLOR_TITLE_BG} ${line#?} %{B-}%{F-}" - ;; - W*) - # bspwm internal state +# T*) +# # xtitle output +# title="%{F$COLOR_TITLE_FG}%{B$COLOR_TITLE_BG} ${line#?} %{B-}%{F-}" +# ;; + D*) + # active desktop + desktop="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?}%{B-}%{F-} " + ;; + Wclear) + # focused occupied desktop wm_infos="" - IFS=':' - set -- ${line#?} - while [ $# -gt 0 ] ; do - item=$1 - name=${item#?} - case $item in - M*) - # active monitor - if [ $num_mon -gt 1 ] ; then - wm_infos="$wm_infos %{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG} ${name} %{B-}%{F-} " - fi - ;; -# m*) -# # inactive monitor -# if [ $num_mon -gt 1 ] ; then -# wm_infos="$wm_infos %{F$COLOR_INACTIVE_MONITOR_FG}%{B$COLOR_INACTIVE_MONITOR_BG} ${name} %{B-}%{F-} " -# fi -# ;; - O*) - # focused occupied desktop - wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOREGROUND} ${name} %{-u}%{B-}%{F-}" - ;; - F*) - # focused free desktop - wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOREGROUND} ${name} %{-u}%{B-}%{F-}" - ;; - U*) - # focused urgent desktop - wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOREGROUND} ${name} %{-u}%{B-}%{F-}" - ;; -# o*) -# # occupied desktop -# wm_infos="${wm_infos}%{F$COLOR_OCCUPIED_FG}%{B$COLOR_OCCUPIED_BG} ${name} %{B-}%{F-}" -# ;; -# f*) -# # free desktop -# wm_infos="${wm_infos}%{F$COLOR_FREE_FG}%{B$COLOR_FREE_BG} ${name} %{B-}%{F-}" -# ;; + ;; + + \**) + # focused occupied desktop + wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FG}%{B$COLOR_FOCUSED_BG}%{U$COLOR_FOCUSED_UG} ${line#?} %{-u}%{B-}%{F-}" + ;; + +*) + # occupied desktop + wm_infos="${wm_infos}%{F$COLOR_OTHER_FG}%{B$COLOR_OTHER_BG} ${line#?} %{B-}%{F-}" + ;; + -*) + # free desktop + wm_infos="${wm_infos}%{F$COLOR_ELSE_FG}%{B$COLOR_ELSE_BG} ${line#?} %{B-}%{F-}" + ;; # u*) # # urgent desktop # wm_infos="${wm_infos}%{F$COLOR_URGENT_FG}%{B$COLOR_URGENT_BG} ${name} %{B-}%{F-}" @@ -164,11 +141,7 @@ while read -r line ; do # # layout # wm_infos="$wm_infos %{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG} ${name} %{B-}%{F-}" # ;; - esac - shift - done - ;; esac # printf "%s\n" "%{l}${wm_infos}${title}%{r}${playing}${paused}${cpu}${ram}${essid}${signal}${volume}${musicvol}${battery}${time_infos} " - printf "%s\n" "%{l}${wm_infos}${title}%{r}${face}${priv}${pub}${mail}${playing}${paused}${cpu}${ram}${volume}${musicvol}${battery}${time_infos}" + printf "%s\n" "%{l}${desktop}${wm_infos}${title}%{r}${face}${priv}${pub}${mail}${playing}${paused}${cpu}${ram}${volume}${musicvol}${battery}${time_infos}" done -- cgit v1.2.3-54-g00ecf