Polybar: Environment variable controls for days
This commit is contained in:
parent
eab1250bb5
commit
521001a661
@ -1,3 +1,6 @@
|
||||
#!/bin/bash
|
||||
export PB_BAR_WIDTH=2548
|
||||
export PB_WLAN_INTERFACE=wlp5s0
|
||||
export PB_BAR_SECONDARY_WIDTH=1908
|
||||
export PB_MODULE_BAR_WIDTH=75
|
||||
export PB_MODULE_WLAN_INTERFACE=wlp5s0
|
||||
|
||||
|
@ -35,7 +35,7 @@ bar-empty = ${self.border}
|
||||
|
||||
[res/config]
|
||||
padding = 4
|
||||
bar-width = 50
|
||||
bar-width = ${env:PB_MODULE_BAR_WIDTH:50}
|
||||
bar-indicator =
|
||||
bar-fill = |
|
||||
|
||||
@ -92,9 +92,9 @@ inherit = template/bar
|
||||
tray-detached = true
|
||||
tray-position = center
|
||||
|
||||
modules-left = battery cpu memory
|
||||
#modules-center =
|
||||
modules-right = xbacklight volume | dropbox date
|
||||
modules-left = ${env:PB_BAR_PRIMARY_MODULES_LEFT:battery cpu memory}
|
||||
modules-center = ${env:PB_BAR_PRIMARY_MODULES_CENTER: }
|
||||
modules-right = ${env:PB_BAR_PRIMARY_MODULES_RIGHT:xbacklight volume | dropbox date}
|
||||
|
||||
[bar/primary-2]
|
||||
monitor = ${env:PB_MONITOR:eDP-1}
|
||||
@ -104,18 +104,31 @@ bottom = false
|
||||
border-bottom-size = 4
|
||||
border-top-size = 0
|
||||
|
||||
modules-left = bspwm
|
||||
modules-center = xwindow
|
||||
modules-right = fs-home | tor wlan
|
||||
modules-left = ${env:PB_BAR_PRIMARY_2_MODULES_LEFT:bspwm}
|
||||
modules-center = ${env:PB_BAR_PRIMARY_2_MODULES_CENTER:xwindow}
|
||||
modules-right = ${env:PB_BAR_PRIMARY_2_MODULES_RIGHT:fs-home | tor wlan}
|
||||
|
||||
[bar/secondary]
|
||||
width = ${env:PB_BAR_2_WIDTH:1908}
|
||||
width = ${env:PB_BAR_SECONDARY_WIDTH:1908}
|
||||
monitor = ${env:PB_MONITOR}
|
||||
inherit = template/bar
|
||||
|
||||
modules-left = bspwm
|
||||
modules-center =
|
||||
modules-right =
|
||||
modules-left = ${env:PB_BAR_SECONDARY_MODULES_LEFT:bspwm}
|
||||
modules-center = ${env:PB_BAR_SECONDARY_MODULES_CENTER: }
|
||||
modules-right = ${env:PB_BAR_SECONDARY_MODULES_RIGHT: }
|
||||
|
||||
[bar/secondary-2]
|
||||
width = ${env:PB_BAR_SECONDARY_WIDTH:1908}
|
||||
monitor = ${env:PB_MONITOR}
|
||||
inherit = template/bar
|
||||
|
||||
bottom = false
|
||||
border-bottom-size = 4
|
||||
border-top-size = 0
|
||||
|
||||
modules-left = ${env:PB_BAR_SECONDARY_2_MODULES_LEFT:bspwm}
|
||||
modules-center = ${env:PB_BAR_SECONDARY_2_MODULES_CENTER: }
|
||||
modules-right = ${env:PB_BAR_SECONDARY_2_MODULES_RIGHT: }
|
||||
|
||||
#========================================
|
||||
# MODULES
|
||||
@ -301,7 +314,7 @@ format-connected-prefix-foreground = ${res/colors.icon-wlan}
|
||||
format-disconnected = <label-disconnected>
|
||||
format-disconnected-prefix = "WLAN: "
|
||||
format-disconnected-prefix-foreground = ${res/colors.icon-wlan}
|
||||
interface = ${env:PB_WLAN_INTERFACE:wlp1s0}
|
||||
interface = ${env:PB_MODULE_WLAN_INTERFACE:wlp1s0}
|
||||
|
||||
label-connected = %essid%
|
||||
label-disconnected = None
|
||||
|
@ -26,7 +26,9 @@ if [[ $secondary_monitors == "" ]]; then
|
||||
fi
|
||||
for monitor in $secondary_monitors; do
|
||||
printf "[INFO] Starting Polybar secondary on monitor $monitor"
|
||||
PB_MONITOR=$monitor polybar -r secondary
|
||||
PB_MONITOR=$monitor
|
||||
polybar -r secondary&
|
||||
polybar -r secondary-2&
|
||||
done
|
||||
|
||||
disown
|
||||
|
Loading…
Reference in New Issue
Block a user