Split polybar in 3 different bars and simplified them

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2021-11-18 12:21:01 +01:00
parent 57b0d74063
commit e954fad819
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283
2 changed files with 67 additions and 28 deletions

View File

@ -19,17 +19,22 @@ for DISP in ${DISPLAYS}; do
done
killall -q polybar
if [ ${EXT_PRIMARY} != "" ]; then
if [ "${EXT_PRIMARY}" != "" ]; then
xrandr --output ${EXT_PRIMARY} --primary --output eDP --right-of ${EXT_PRIMARY}
bspc monitor ${EXT_PRIMARY} -d I II III IV V
bspc monitor eDP -d VI VII VIII IX X
MONITOR="eDP" polybar main 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar ext 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar left 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar center 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar right 2>&1 | tee -a /tmp/polybar.log & disown
else
bspc monitor eDP -d I II III IV V VI VII VIII IX X
MONITOR="eDP" polybar main 2>&1 | tee -a /tmp/polybar.log & disown
fi
MONITOR="eDP" polybar left 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR="eDP" polybar center 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR="eDP" polybar right 2>&1 | tee -a /tmp/polybar.log & disown
bspc config border_width 0
bspc config top_padding 34
bspc config window_gap 8

View File

@ -27,14 +27,13 @@ primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/main]
[bar/left]
monitor = ${env:MONITOR:eDP}
width = 100%
width = 12%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 6.0
radius = 3.0
fixed-center = false
background = ${colors.background}
@ -52,11 +51,8 @@ module-margin-left = 1
module-margin-right = 2
font-0 = FiraCode Nerd Font:style=medium:size=10
font-1 = siji:pixelsize=10;1
modules-left = bspwm
modules-center = xwindow
modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth battery date powermenu
modules-center = date
tray-position = right
tray-padding = 2
@ -76,13 +72,13 @@ wm-restack = bspwm
cursor-click = pointer
cursor-scroll = ns-resize
[bar/ext]
monitor = ${env:MONITOR:DisplayPort-2}
width = 100%
[bar/center]
monitor = ${env:MONITOR:eDP}
width = 30%
height = 27
;offset-x = 1%
offset-x = 35%
;offset-y = 1%
radius = 6.0
radius = 3.0
fixed-center = false
background = ${colors.background}
@ -100,11 +96,52 @@ module-margin-left = 1
module-margin-right = 2
font-0 = FiraCode Nerd Font:style=medium:size=10
font-1 = siji:pixelsize=10;1
modules-left = bspwm
modules-center = xwindow
modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth battery date powermenu
modules-center = bspwm
tray-position = right
tray-padding = 2
;tray-background = #0063ff
wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[bar/right]
monitor = ${env:MONITOR:eDP}
width = 23%
height = 27
offset-x = 77%
;offset-y = 1%
radius = 3.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = FiraCode Nerd Font:style=medium:size=10
modules-center = pulseaudio memory cpu wlan eth battery
tray-position = right
tray-padding = 2
@ -124,6 +161,7 @@ wm-restack = bspwm
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:50:...%
@ -255,19 +293,15 @@ format-disconnected =
[module/date]
type = internal/date
interval = 5
interval = 1
date =
date-alt = " %Y-%m-%d"
time = %H:%M
time-alt = %H:%M:%S
date = " %Y-%m-%d %H:%M:%S"
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
label = %date%
[module/pulseaudio]
type = internal/pulseaudio