Polybar: Set up inheritance to a global template module

This commit is contained in:
Salt 2017-09-15 02:04:12 -05:00
parent 12e0da1050
commit 56741b6cb9

View File

@ -123,7 +123,11 @@ content-foreground = ${res/colors.foreground}
# TEMPLATE # TEMPLATE
#==================== #====================
[template/module]
format-padding = 0
[template/module/battery] [template/module/battery]
inherit = template/module
type = internal/battery type = internal/battery
battery = BAT0 battery = BAT0
format-charging-underline = ${res/colors.underline-battery} format-charging-underline = ${res/colors.underline-battery}
@ -134,11 +138,13 @@ full-at = 95
interval = 15 interval = 15
[template/module/cpu] [template/module/cpu]
inherit = template/module
type = internal/cpu type = internal/cpu
format-underline = ${res/colors.underline-cpu} format-underline = ${res/colors.underline-cpu}
interval = 1 interval = 1
[template/module/network] [template/module/network]
inherit = template/module
type = internal/network type = internal/network
interface = wlp1s0 interface = wlp1s0
format-connected = <label-connected> format-connected = <label-connected>
@ -157,6 +163,7 @@ label-disconnected =
interval = 1 interval = 1
[template/module/temperature] [template/module/temperature]
inherit = template/module
type = internal/temperature type = internal/temperature
thermal-zone = 0 thermal-zone = 0
warn-temperature = 50 warn-temperature = 50
@ -164,6 +171,7 @@ warn-temperature = 50
# STOCK # STOCK
#==================== #====================
[module/i3] [module/i3]
inherit = template/module
type = internal/i3 type = internal/i3
format = <label-state> <label-mode> format = <label-state> <label-mode>
index-sort = true index-sort = true
@ -192,6 +200,7 @@ label-urgent-padding = ${self.label-focused-padding}
label-urgent-overline = ${res/colors.alert} label-urgent-overline = ${res/colors.alert}
[module/bspwm] [module/bspwm]
inherit = template/module
type = internal/bspwm type = internal/bspwm
enable-click = true enable-click = true
enable-scroll = true enable-scroll = true
@ -294,6 +303,7 @@ format-prefix-foreground = ${self.format-underline}
label = %percentage%% label = %percentage%%
[module/date] [module/date]
inherit = template/module
type = internal/date type = internal/date
format-underline = ${res/colors.underline-date} format-underline = ${res/colors.underline-date}
@ -310,6 +320,7 @@ label = %date% %time%
interval = 30 interval = 30
[module/date-mini] [module/date-mini]
inherit = template/module
type = internal/date type = internal/date
format-underline = ${res/colors.underline-date} format-underline = ${res/colors.underline-date}
@ -322,6 +333,7 @@ label= %date%%time%
interval = 60 interval = 60
[module/memory-label] [module/memory-label]
inherit = template/module
type = internal/memory type = internal/memory
format = <label> format = <label>
format-underline = ${res/colors.underline-memory} format-underline = ${res/colors.underline-memory}
@ -331,6 +343,7 @@ format-prefix-foreground = ${self.format-underline}
label = %percentage_used%% (%gb_used%) label = %percentage_used%% (%gb_used%)
[module/mpd] [module/mpd]
inherit = template/module
type = internal/mpd type = internal/mpd
format-online = <label-song> <label-time> format-online = <label-song> <label-time>
format-offline = format-offline =
@ -398,6 +411,7 @@ label-warn =  %temperature%
label-warn-foreground = ${res/colors.alert} label-warn-foreground = ${res/colors.alert}
[module/volume-ramp] [module/volume-ramp]
inherit = template/module
type = internal/volume type = internal/volume
format-volume = <ramp-volume> <label-volume> format-volume = <ramp-volume> <label-volume>
format-volume-underline = ${res/colors.underline-volume} format-volume-underline = ${res/colors.underline-volume}
@ -414,6 +428,7 @@ ramp-volume-2 = 
ramp-volume-foreground = ${self.format-volume-underline} ramp-volume-foreground = ${self.format-volume-underline}
[module/volume-ramp-mini] [module/volume-ramp-mini]
inherit = template/module
type = internal/volume type = internal/volume
format-volume = <ramp-volume> format-volume = <ramp-volume>
format-volume-underline = ${res/colors.underline-volume} format-volume-underline = ${res/colors.underline-volume}
@ -426,6 +441,7 @@ ramp-volume-1 = 
ramp-volume-2 =  ramp-volume-2 = 
[module/weather-mini] [module/weather-mini]
inherit = template/module
type = custom/script type = custom/script
exec = $HOME/.config/polybar/weather.sh exec = $HOME/.config/polybar/weather.sh
exec-if = wget -q --spider http://www.startpage.com/ exec-if = wget -q --spider http://www.startpage.com/
@ -449,14 +465,15 @@ inherit = template/module/network
label-connected =  %upspeed%  %downspeed% label-connected =  %upspeed%  %downspeed%
[module/eth-network] [module/eth-network]
type = internal/network
inherit = module/wlan-network inherit = module/wlan-network
type = internal/network
interface = enp0s31f6 interface = enp0s31f6
label-connected =  %upspeed%  %downspeed% label-connected =  %upspeed%  %downspeed%
label-connected-foreground = ${res/colors.primary-dark} label-connected-foreground = ${res/colors.primary-dark}
label-disconnected = label-disconnected =
[module/xbacklight-ramp] [module/xbacklight-ramp]
inherit = template/module
type = internal/xbacklight type = internal/xbacklight
format = <ramp> <label> format = <ramp> <label>
format-underline = ${res/colors.underline-backlight} format-underline = ${res/colors.underline-backlight}
@ -473,6 +490,7 @@ ramp-6 = 
ramp-foreground = ${self.format-underline} ramp-foreground = ${self.format-underline}
[module/xbacklight-ramp-mini] [module/xbacklight-ramp-mini]
inherit = template/module
type = internal/xbacklight type = internal/xbacklight
format = <ramp> format = <ramp>
format-underline = ${res/colors.underline-backlight} format-underline = ${res/colors.underline-backlight}
@ -486,6 +504,7 @@ ramp-5 = 
ramp-6 =  ramp-6 = 
[module/xkeyboard-label] [module/xkeyboard-label]
inherit = template/module
type = internal/xkeyboard type = internal/xkeyboard
format = <label-indicator> format = <label-indicator>
@ -493,6 +512,7 @@ label-indicator = %name%
label-indicator-overline = ${res/colors.primary} label-indicator-overline = ${res/colors.primary}
[module/xwindow-label] [module/xwindow-label]
inherit = template/module
type = internal/xwindow type = internal/xwindow
label = %title% label = %title%
label-maxlen = 75 label-maxlen = 75