From 842c3c6d7c3084851980e8c7fbe0fe1dccb81dee Mon Sep 17 00:00:00 2001 From: Daniel Sissom Date: Wed, 24 Jul 2019 16:57:28 -0500 Subject: [PATCH] Fixed bspwm desktop names and added clickable desktop switching to panel. Seems to be a bug (in lemonbar?) that misaligns clickable areas for centered clickable text. --- bspwm/bspwmrc | 3 +-- bspwm/panel/panel | 2 +- bspwm/panel/panel_bar | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index e741a4e..6a33841 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -58,9 +58,8 @@ i=1 #for monitor in $(bspc query -M); do for monitor in $(bspc query -M --names); do bspc monitor $monitor \ - -d $i/{Desktop-2, Desktop-1, Desktop-0, Desktop+1, Desktop+2} + -d $i/Desktop-2 $i/Desktop-1 $i/Desktop-0 $i/Desktop+1 $i/Desktop+2 #-n "$i" \ - #-d $i/{I,II,III,IV,V,VI,VII,VIII,IX,X} let i++ done #NMON=$i diff --git a/bspwm/panel/panel b/bspwm/panel/panel index d70e9b9..b477cda 100755 --- a/bspwm/panel/panel +++ b/bspwm/panel/panel @@ -18,7 +18,7 @@ xtitle -sf 'T%s\n' | sed -u 's/^\(.............................................. bspc subscribe report > "$PANEL_FIFO" & tick > "$PANEL_FIFO" & -~/.config/bspwm/panel/panel_bar < "$PANEL_FIFO" | lemonbar -n "$PANEL_WM_NAME" -g "x$PANEL_HEIGHT" -B "#BF000000" -F "#FF9A875F" -f "$PANEL_FONT" -f "$PANEL_FONT2" -f "$PANEL_FONT3" | sh & +~/.config/bspwm/panel/panel_bar < "$PANEL_FIFO" | lemonbar -n "$PANEL_WM_NAME" -g "x$PANEL_HEIGHT" -a 20 -B "#BF000000" -F "#FF9A875F" -f "$PANEL_FONT" -f "$PANEL_FONT2" -f "$PANEL_FONT3" | sh & wid=$(xdo id -m -a "$PANEL_WM_NAME") xdo above -t $(xdo id -N Bspwm -n root | sort | head -n 1) $wid diff --git a/bspwm/panel/panel_bar b/bspwm/panel/panel_bar index 1e8641d..10ddcf1 100755 --- a/bspwm/panel/panel_bar +++ b/bspwm/panel/panel_bar @@ -33,6 +33,7 @@ while read -r line ; do wm_infos="$wm_infos%{F-} %{F-}" ;; [fFoOuU]*) + wm_infos="${wm_infos}%{A:bspc desktop -f ${name}:}" case $item in [OF]*) if [ "$on_focused_monitor" ]; then @@ -60,6 +61,7 @@ while read -r line ; do wm_infos="$wm_infos%{F#FF0000} ○ %{F-}" ;; esac + wm_infos="${wm_infos}%{A}" ;; esac shift