Further polybar refactoring thanks to variables
parent
76ab54f7a0
commit
437dea9d57
|
@ -9,6 +9,44 @@ accent = #fba922
|
|||
[global/wm]
|
||||
margin-top=50
|
||||
|
||||
; Common to top and bottom bars
|
||||
[bar/common]
|
||||
width = 100%
|
||||
dpi = ${variables.dpi}
|
||||
enable-ipc = true
|
||||
height = ${variables.height}
|
||||
foreground = ${colors.foreground}
|
||||
background = ${colors.background}
|
||||
line-size = 3
|
||||
line-color = #f00
|
||||
|
||||
locale = fr_FR.UTF-8
|
||||
monitor = ${env:MONITOR:HDMI-0}
|
||||
|
||||
[bar/chostytopbar]
|
||||
inherit = bar/common
|
||||
font-0 = NotoSans-Regular:size=10;2
|
||||
font-1 = MaterialIcons-Regular:size=11;4
|
||||
font-2 = Symbola:size=10;2
|
||||
font-3 = Weather Icons:size=10;3
|
||||
|
||||
overline-size = 10
|
||||
underline-size = 10
|
||||
overline-color = ${self.background}
|
||||
underline-color = ${self.background}
|
||||
border-bottom-size = 1
|
||||
border-bottom-color = #333
|
||||
padding-left = 2
|
||||
padding-right = 10
|
||||
module-margin-left = 4
|
||||
module-margin-right = 4
|
||||
|
||||
modules-left = ${variables.top_left}
|
||||
modules-center = ${variables.top_center}
|
||||
modules-right = ${variables.top_right}
|
||||
|
||||
tray-position = right
|
||||
|
||||
[bar/chostybottombar]
|
||||
inherit = bar/common
|
||||
bottom = true
|
||||
|
@ -41,7 +79,7 @@ label-maxlen=100
|
|||
|
||||
[module/wireless-network]
|
||||
type = internal/network
|
||||
interface = wlp8s0
|
||||
interface = ${variables.wireless_interface}
|
||||
interval = 1
|
||||
label-connected = %{F#ddd}%essid% %local_ip% %{F#77dd77}%{F-}%downspeed% %{F#dd7777}%{F-}%upspeed%
|
||||
label-disconnected = Ethernet disconnected
|
||||
|
@ -222,58 +260,21 @@ interval = 60
|
|||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/system-uptime-pretty.sh
|
||||
interval = 30
|
||||
; Common to top and bottom bars
|
||||
[bar/common]
|
||||
width = 100%
|
||||
enable-ipc = true
|
||||
height = 27
|
||||
foreground = ${colors.foreground}
|
||||
background = ${colors.background}
|
||||
line-size = 3
|
||||
line-color = #f00
|
||||
[variables]
|
||||
dpi = 150
|
||||
height = 54
|
||||
wireless_interface = wlp2s0
|
||||
top_left = powermenu system-uptime-pretty battery
|
||||
top_center = xwindow
|
||||
top_right = system-usb-udev pulseaudio date
|
||||
|
||||
locale = fr_FR.UTF-8
|
||||
monitor = ${env:MONITOR:HDMI-0}
|
||||
|
||||
[bar/chostytopbar]
|
||||
inherit = bar/common
|
||||
font-0 = NotoSans-Regular:size=10;2
|
||||
font-1 = MaterialIcons-Regular:size=11;4
|
||||
font-2 = Symbola:size=10;2
|
||||
font-3 = Weather Icons:size=10;3
|
||||
|
||||
overline-size = 10
|
||||
underline-size = 10
|
||||
overline-color = ${self.background}
|
||||
underline-color = ${self.background}
|
||||
border-bottom-size = 1
|
||||
border-bottom-color = #333
|
||||
padding-left = 2
|
||||
padding-right = 10
|
||||
module-margin-left = 4
|
||||
module-margin-right = 4
|
||||
|
||||
modules-left = powermenu system-uptime-pretty
|
||||
modules-center = xwindow
|
||||
modules-right = system-usb-udev volume date
|
||||
|
||||
tray-position = right
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
|
||||
master-soundcard = hw:PCH
|
||||
speaker-soundcard = hw:PCH
|
||||
headphone-soundcard = hw:PCH
|
||||
|
||||
master-mixer = Master
|
||||
speaker-mixer = Front
|
||||
|
||||
mapped = true
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
interval = 5
|
||||
|
||||
format-volume = <ramp-volume> <label-volume>
|
||||
label-muted = 🔇 muted
|
||||
label-muted-foreground = #66
|
||||
label-muted-foreground = #666
|
||||
|
||||
ramp-volume-0 = 🔈
|
||||
ramp-volume-1 = 🔉
|
||||
|
@ -281,3 +282,16 @@ ramp-volume-2 = 🔊
|
|||
|
||||
ramp-headphones-0 =
|
||||
ramp-headphones-1 =
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full-at = 100
|
||||
battery = BAT0
|
||||
adapter = AC0
|
||||
poll-interval = 5
|
||||
format-charging = <label-charging>
|
||||
format-discharging = <label-discharging>
|
||||
format-full = <label-full>
|
||||
label-charging = %percentage%%
|
||||
label-discharging = %percentage%%
|
||||
label-full = %{F#77dd77}
|
||||
|
|
|
@ -1,39 +1,10 @@
|
|||
; Common to top and bottom bars
|
||||
[bar/common]
|
||||
width = 100%
|
||||
enable-ipc = true
|
||||
[variables]
|
||||
dpi = 100
|
||||
height = 27
|
||||
foreground = ${colors.foreground}
|
||||
background = ${colors.background}
|
||||
line-size = 3
|
||||
line-color = #f00
|
||||
|
||||
locale = fr_FR.UTF-8
|
||||
monitor = ${env:MONITOR:HDMI-0}
|
||||
|
||||
[bar/chostytopbar]
|
||||
inherit = bar/common
|
||||
font-0 = NotoSans-Regular:size=10;2
|
||||
font-1 = MaterialIcons-Regular:size=11;4
|
||||
font-2 = Symbola:size=10;2
|
||||
font-3 = Weather Icons:size=10;3
|
||||
|
||||
overline-size = 10
|
||||
underline-size = 10
|
||||
overline-color = ${self.background}
|
||||
underline-color = ${self.background}
|
||||
border-bottom-size = 1
|
||||
border-bottom-color = #333
|
||||
padding-left = 2
|
||||
padding-right = 10
|
||||
module-margin-left = 4
|
||||
module-margin-right = 4
|
||||
|
||||
modules-left = powermenu system-uptime-pretty
|
||||
modules-center = xwindow
|
||||
modules-right = system-usb-udev volume date
|
||||
|
||||
tray-position = right
|
||||
wireless_interface = wlp8s0
|
||||
top_left = powermenu system-uptime-pretty
|
||||
top_center = xwindow
|
||||
top_right = system-usb-udev volume date
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
|
|
|
@ -1,40 +1,10 @@
|
|||
; Common to top and bottom bars
|
||||
[bar/common]
|
||||
[variables]
|
||||
dpi = 150
|
||||
width = 100%
|
||||
enable-ipc = true
|
||||
height = 54
|
||||
foreground = ${colors.foreground}
|
||||
background = ${colors.background}
|
||||
line-size = 3
|
||||
line-color = #f00
|
||||
|
||||
locale = fr_FR.UTF-8
|
||||
monitor = ${env:MONITOR:HDMI-0}
|
||||
|
||||
[bar/chostytopbar]
|
||||
inherit = bar/common
|
||||
font-0 = NotoSans-Regular:size=10;2
|
||||
font-1 = MaterialIcons-Regular:size=11;4
|
||||
font-2 = Symbola:size=11;2
|
||||
font-3 = Weather Icons:size=10;3
|
||||
|
||||
overline-size = 10
|
||||
underline-size = 10
|
||||
overline-color = ${self.background}
|
||||
underline-color = ${self.background}
|
||||
border-bottom-size = 1
|
||||
border-bottom-color = #333
|
||||
padding-left = 2
|
||||
padding-right = 10
|
||||
module-margin-left = 4
|
||||
module-margin-right = 4
|
||||
|
||||
modules-left = powermenu system-uptime-pretty battery
|
||||
modules-center = xwindow
|
||||
modules-right = system-usb-udev pulseaudio date
|
||||
|
||||
tray-position = right
|
||||
wireless_interface = wlp2s0
|
||||
top_left = powermenu system-uptime-pretty battery
|
||||
top_center = xwindow
|
||||
top_right = system-usb-udev pulseaudio date
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
|
|
@ -9,6 +9,44 @@ accent = #fba922
|
|||
[global/wm]
|
||||
margin-top=50
|
||||
|
||||
; Common to top and bottom bars
|
||||
[bar/common]
|
||||
width = 100%
|
||||
dpi = ${variables.dpi}
|
||||
enable-ipc = true
|
||||
height = ${variables.height}
|
||||
foreground = ${colors.foreground}
|
||||
background = ${colors.background}
|
||||
line-size = 3
|
||||
line-color = #f00
|
||||
|
||||
locale = fr_FR.UTF-8
|
||||
monitor = ${env:MONITOR:HDMI-0}
|
||||
|
||||
[bar/chostytopbar]
|
||||
inherit = bar/common
|
||||
font-0 = NotoSans-Regular:size=10;2
|
||||
font-1 = MaterialIcons-Regular:size=11;4
|
||||
font-2 = Symbola:size=10;2
|
||||
font-3 = Weather Icons:size=10;3
|
||||
|
||||
overline-size = 10
|
||||
underline-size = 10
|
||||
overline-color = ${self.background}
|
||||
underline-color = ${self.background}
|
||||
border-bottom-size = 1
|
||||
border-bottom-color = #333
|
||||
padding-left = 2
|
||||
padding-right = 10
|
||||
module-margin-left = 4
|
||||
module-margin-right = 4
|
||||
|
||||
modules-left = ${variables.top_left}
|
||||
modules-center = ${variables.top_center}
|
||||
modules-right = ${variables.top_right}
|
||||
|
||||
tray-position = right
|
||||
|
||||
[bar/chostybottombar]
|
||||
inherit = bar/common
|
||||
bottom = true
|
||||
|
@ -41,7 +79,7 @@ label-maxlen=100
|
|||
|
||||
[module/wireless-network]
|
||||
type = internal/network
|
||||
interface = wlp8s0
|
||||
interface = ${variables.wireless_interface}
|
||||
interval = 1
|
||||
label-connected = %{F#ddd}%essid% %local_ip% %{F#77dd77}%{F-}%downspeed% %{F#dd7777}%{F-}%upspeed%
|
||||
label-disconnected = Ethernet disconnected
|
||||
|
|
|
@ -78,3 +78,6 @@ for m in $merge_config; do
|
|||
cat "${f}" >> ${CONFIG}/${m}/config
|
||||
done
|
||||
done
|
||||
|
||||
# Reload i3 configuration
|
||||
i3-msg reload && echo "Successfully reloaded i3 config"
|
||||
|
|
Loading…
Reference in New Issue