Polybar: Add temperature module, use settings properly

This commit is contained in:
Salt 2019-07-04 20:49:52 -05:00
parent 9f4fd37c06
commit 344be9e6ec

View File

@ -32,7 +32,11 @@ cyan = #88C0D0
[res/config]
padding = 2
padding-bar = 3
[settings]
screenchange-reload = true
format-padding = ${res/config.padding}
format-background = ${res/colors.bg-dark}
# ====================
# BARS
@ -43,13 +47,11 @@ wm-restack = ${env:PB_WM_RESTACK:i3}
tray-maxsize = 16
background = ${res/colors.bg-dark}
foregrouond = ${res/colors.fg}
foreground = ${res/colors.fg}
border-color = ${res/colors.border}
tray-background = ${res/colors.bg-dark}
height = 32
padding = ${res/config.padding-bar}
module-margin = 2
font-0 = "Inconsolata:style=Medium:size=10;2"
font-1 = "Deja Vu Sans Mono:style=Regular:size=10;2"
@ -59,7 +61,7 @@ monitor = ${env:PB_MONITOR:eDP-1}
inherit = template/bar
border-top-size = 1
modules-left = i3 cpu memory battery
modules-left = i3 cpu memory battery temp
modules-right = backlight pulse date
# ====================
@ -90,7 +92,6 @@ format-discharging = <ramp-capacity> <label-discharging>
format-full = <ramp-capacity> <label-full>
label-charging = %percentage:3%%
label-discharging = %percentage:3%%
label-full= %percentage:3%%
ramp-capacity-foreground = ${res/colors.green}
ramp-capacity-0 = ▁
ramp-capacity-0-foreground = ${res/colors.red}
@ -144,9 +145,10 @@ label-focused-padding = ${res/config.padding}
label-focused-foreground = ${res/colors.fg}
label-focused-background = ${res/colors.selection}
label-unfocused = %name%
label-unfocused-background = ${res/colors.bg-dark}
label-unfocused-padding = ${res/config.padding}
label-visible = %name%
label-visible-foreground = ${res/colors.bg-light}
label-visible-background = ${res/colors.bg-light}
label-visible-padding = ${res/config.padding}
[module/memory]
@ -195,3 +197,23 @@ ramp-volume-4 = ▅
ramp-volume-5 = ▆
ramp-volume-6 = ▇
ramp-volume-7 = █
[module/temp]
type = internal/temperature
units = true
warn-temperature = 80
format = <ramp> <label>
format-warn = <ramp> <label-warn>
label = %temperature-c:6%
label-warn = %temperature-c:6%
label-warn-foreground = ${res/colors.red}
ramp-foreground = ${res/colors.yellow}
ramp-0 = ▁
ramp-1 = ▂
ramp-2 = ▃
ramp-3 = ▄
ramp-4 = ▅
ramp-5 = ▆
ramp-6 = ▇
ramp-7 = █
ramp-7-foreground = ${res/colors.red}