summaryrefslogtreecommitdiffstats
path: root/bspwm/.config/panel/panel_bar
diff options
context:
space:
mode:
authorAmin Bandali <me@aminb.org>2014-10-25 10:09:58 -0400
committerAmin Bandali <me@aminb.org>2014-10-25 10:09:58 -0400
commitdac80d79b0f68cd143c15c9a4769d630a7d03d08 (patch)
tree4d2208beff0059f35f6bda8e8dbc765f9ad2fbd5 /bspwm/.config/panel/panel_bar
parent9eddbbd768cc084192032f59331f1e087a6156ff (diff)
downloadconfigs-dac80d79b0f68cd143c15c9a4769d630a7d03d08.tar.gz
configs-dac80d79b0f68cd143c15c9a4769d630a7d03d08.tar.xz
configs-dac80d79b0f68cd143c15c9a4769d630a7d03d08.zip
add the panel
Diffstat (limited to '')
-rwxr-xr-xbspwm/.config/panel/panel_bar74
1 files changed, 74 insertions, 0 deletions
diff --git a/bspwm/.config/panel/panel_bar b/bspwm/.config/panel/panel_bar
new file mode 100755
index 0000000..026ba78
--- /dev/null
+++ b/bspwm/.config/panel/panel_bar
@@ -0,0 +1,74 @@
+#! /bin/sh
+#
+# Example panel for LemonBoy's bar
+
+. panel_colors
+
+num_mon=$(bspc query -M | wc -l)
+
+while read -r line ; do
+ case $line in
+ S*)
+ # clock output
+ sys_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
+ 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_ACTIVE_MONITOR_FG}%{B$COLOR_ACTIVE_MONITOR_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_OCCUPIED_FG}%{B$COLOR_FOCUSED_OCCUPIED_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
+ ;;
+ F*)
+ # focused free desktop
+ wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FREE_FG}%{B$COLOR_FOCUSED_FREE_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
+ ;;
+ U*)
+ # focused urgent desktop
+ wm_infos="${wm_infos}%{F$COLOR_FOCUSED_URGENT_FG}%{B$COLOR_FOCUSED_URGENT_BG}%{U$COLOR_FOREGROUND}%{+u} ${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-}"
+ ;;
+ u*)
+ # urgent desktop
+ wm_infos="${wm_infos}%{F$COLOR_URGENT_FG}%{B$COLOR_URGENT_BG} ${name} %{B-}%{F-}"
+ ;;
+ L*)
+ # 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}%{c}${title}%{r}${sys_infos}"
+done