Changed the way desktops are declared in polybar, using label for easier handling

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2022-06-07 16:37:32 +02:00
parent 2c9a3e72d7
commit 6acb727019
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283
3 changed files with 25 additions and 10 deletions

View File

@ -5,7 +5,7 @@ pgrep -x sxhkd > /dev/null || sxhkd &
xrdb -load $HOME/.config/.Xresources & xrdb -load $HOME/.config/.Xresources &
dunst -conf $HOME/.config/dunst/dunstrc & dunst -conf $HOME/.config/dunst/dunstrc &
picom --experimental-backends & picom --experimental-backends &
feh --bg-fill ~/Pictures/wallhaven-dpzww3.jpg & $HOME/.fehbg &
/usr/lib/kdeconnectd & disown /usr/lib/kdeconnectd & disown
nextcloud & disown nextcloud & disown
@ -25,11 +25,11 @@ done
killall -q polybar killall -q polybar
if [ "${EXT_PRIMARY}" != "" ]; then if [ "${EXT_PRIMARY}" != "" ]; then
xrandr --output ${EXT_PRIMARY} --primary --output ${INTEGRATED_DISPLAY} --right-of ${EXT_PRIMARY} xrandr --output ${EXT_PRIMARY} --primary --output ${INTEGRATED_DISPLAY} --right-of ${EXT_PRIMARY}
bspc monitor ${EXT_PRIMARY} -d 一 二 三 四 五 bspc monitor ${EXT_PRIMARY} -d 1 2 3 4 5
bspc monitor ${INTEGRATED_DISPLAY} -d 六 七 八 九 十 bspc monitor ${INTEGRATED_DISPLAY} -d 6 7 8 9 0
MONITOR=${EXT_PRIMARY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown MONITOR=${EXT_PRIMARY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown
else else
bspc monitor eDP -d 一 二 三 四 五 六 七 八 九 十 bspc monitor ${INTEGRATED_DISPLAY} -d 1 2 3 4 5 6 7 8 9 0
fi fi
MONITOR=${INTEGRATED_DISPLAY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown MONITOR=${INTEGRATED_DISPLAY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown

View File

@ -68,19 +68,30 @@ label = %title:0:50:...%
[module/bspwm] [module/bspwm]
type = internal/bspwm type = internal/bspwm
label-focused = %name% ws-icon-0 = 1;一
ws-icon-1 = 2;二
ws-icon-2 = 3;三
ws-icon-3 = 4;四
ws-icon-4 = 5;五
ws-icon-5 = 6;六
ws-icon-6 = 7;七
ws-icon-7 = 8;八
ws-icon-8 = 9;九
ws-icon-9 = 0;十
label-focused = %icon%
label-focused-background = ${colors.background-alt} label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary} label-focused-underline= ${colors.primary}
label-focused-padding = 2 label-focused-padding = 2
label-occupied = %name% label-occupied = %icon%
label-occupied-padding = 2 label-occupied-padding = 2
label-urgent = %name%! label-urgent = %icon%!
label-urgent-background = ${colors.alert} label-urgent-background = ${colors.alert}
label-urgent-padding = 2 label-urgent-padding = 2
label-empty = %name% label-empty = %icon%
label-empty-foreground = ${colors.foreground-alt} label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2 label-empty-padding = 2

View File

@ -27,10 +27,10 @@ super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east} bspc node -{f,s} {west,south,north,east}
#Focus the given desktop #Focus the given desktop
super + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave} super + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave}
bspc desktop -f '^{1,2,3,4,5,6,7,8,9,0}' bspc desktop -f '{1,2,3,4,5,6,7,8,9,0}'
#Send and follow to the given desktop #Send and follow to the given desktop
super + shift + {1,2,3,4,5,6,7,8,9,0} super + shift + {1,2,3,4,5,6,7,8,9,0}
bspc node -d {'一', '二', '三', '四', '五', '六', '七', '八', '九', '十'} --follow bspc node -d '{1,2,3,4,5,6,7,8,9,0}' --follow
#Preselect the direction #Preselect the direction
super + ctrl + {h,j,k,l} super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east} bspc node -p {west,south,north,east}
@ -101,3 +101,7 @@ XF86AudioNext
# Alternate between windows, even across multiple desktops # Alternate between windows, even across multiple desktops
super + Tab super + Tab
bspc node last -f last.\!hidden -f last.\!same_class bspc node last -f last.\!hidden -f last.\!same_class
# Rotate tree
super + shift + {s,d}
bspc node @/ -C {forward,backward}