Refactor polybar with common variables

master
Quentin Duchemin 2018-06-15 21:11:14 +02:00
parent 505f4aedb8
commit de0bfecba8
1 changed files with 26 additions and 38 deletions

View File

@ -8,74 +8,64 @@
;===================================================== ;=====================================================
[colors] [colors]
background = #1f1f1f background = #bb2f343f
background-alt = #444
foreground = #eee foreground = #eee
foreground-alt = #555 foreground-alt = #555
primary = #ffb52a
secondary = #e60053 secondary = #e60053
alert = #bd2c40 alert = #bd2c40
accent = #fba922 accent = #fba922
[bar/chostytopbar] [global/wm]
margin-top=50
; Common to top and bottom bars
[bar/common]
width = 100% width = 100%
monitor = ${env:MONITOR:HDMI-0}
enable-ipc = true enable-ipc = true
height = 27 height = 27
background = ${colors.background}
foreground = ${colors.foreground} foreground = ${colors.foreground}
line-size = 3 line-size = 3
line-color = #f00 line-color = #f00
overline-size = 10 locale = fr_FR.UTF-8
overline-color = ${self.background} monitor = ${env:MONITOR:HDMI-0}
underline-size = 10
underline-color = ${self.background}
border-bottom-size = 1
border-bottom-color = #333
padding-left = 2
padding-right = 5
module-margin-left = 4
module-margin-right = 4
[bar/chostytopbar]
inherit = bar/common
background = ${colors.background}
font-0 = NotoSans-Regular:size=10;2 font-0 = NotoSans-Regular:size=10;2
font-1 = MaterialIcons-Regular:size=11;4 font-1 = MaterialIcons-Regular:size=11;4
font-2 = Symbola:size=10;2 font-2 = Symbola:size=10;2
font-3 = Weather Icons:size=10;3 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 = 5
module-margin-left = 4
module-margin-right = 4
modules-left = powermenu system-uptime-pretty modules-left = powermenu system-uptime-pretty
modules-center = xwindow modules-center = xwindow
modules-right = pulseaudio gmail system-usb-udev date modules-right = pulseaudio gmail system-usb-udev date
locale = fr_FR.UTF-8
tray-position = right tray-position = right
tray-transparent = false
[bar/chostybottombar] [bar/chostybottombar]
width = 100% inherit = bar/common
monitor = ${env:MONITOR:HDMI-0} background = #2f343f
bottom = true bottom = true
enable-ipc = true
height = 27
background = #1c1c1c
foreground = #eefafafa
line-size = 3
line-color = #f00
overline-size = 3 overline-size = 3
overline-color = ${colors.accent} overline-color = ${colors.accent}
underline-size = 3 underline-size = 3
underline-color = ${colors.accent} underline-color = ${colors.accent}
border-top-size = 3
border-top-color = #3d3d3d
spacing = 3 spacing = 3
padding-left = 0 padding-left = 0
padding-right = 5 padding-right = 5
@ -92,8 +82,6 @@ modules-left = i3
;modules-center = ;modules-center =
modules-right = wireless-network wired-network updates-arch-combined temperature cpu memory filesystem-custom modules-right = wireless-network wired-network updates-arch-combined temperature cpu memory filesystem-custom
locale = fr_FR.UTF-8
[module/xwindow] [module/xwindow]
type = internal/xwindow type = internal/xwindow
label = %{F#ddd}%title% label = %{F#ddd}%title%