aboutsummaryrefslogtreecommitdiff
path: root/tools/panel/panel_bar
diff options
context:
space:
mode:
authorVasil Zlatanov <vasil.zlatanov@gmail.com>2015-08-06 20:26:32 +0200
committerVasil Zlatanov <vasil.zlatanov@gmail.com>2015-08-06 20:26:32 +0200
commitb0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6 (patch)
treea6b13f774febd22a62a86321c23ed17ee9ca7e1d /tools/panel/panel_bar
parent933a36bf3cc532b0f6070772defa067dad8472da (diff)
downloaddotfiles-b0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6.tar.gz
dotfiles-b0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6.tar.bz2
dotfiles-b0708ad010b4e557f52bf3c8dc37b3b3b9e08fc6.zip
switching back to ratpoison
Diffstat (limited to 'tools/panel/panel_bar')
-rwxr-xr-xtools/panel/panel_bar77
1 files changed, 25 insertions, 52 deletions
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