polybar: animate low battery warning

This commit is contained in:
Vincent Bernat 2021-07-14 09:05:01 +02:00
parent 65caa00117
commit c906475ecf

View file

@ -2,6 +2,7 @@
background = #c0000000 background = #c0000000
foreground = #eaeaea foreground = #eaeaea
highlight = #4c7899 highlight = #4c7899
warning = #ff3121
[settings] [settings]
screenchange-reload = false screenchange-reload = false
@ -78,7 +79,7 @@ interval = 30
format-unmounted = format-unmounted =
format-mounted = format-mounted =
format-warn = <label-warn> format-warn = <label-warn>
format-warn-foreground = #ff0000 format-warn-foreground = ${colors.warning}
label-warn =  %mountpoint%: %percentage_used%% label-warn =  %mountpoint%: %percentage_used%%
[module/brightness] [module/brightness]
@ -120,17 +121,19 @@ label =  %date% %time%
[module/battery] [module/battery]
type = internal/battery type = internal/battery
battery = BAT0 poll-interval = 30
adapter = ADP1
interval = 5
format-charging = <label-charging> format-charging = <label-charging>
label-charging =  %percentage: 2%% label-charging =  %percentage: 2%%
format-discharging = <ramp-capacity> <label-discharging> format-discharging = <ramp-capacity> <label-discharging>
label-discharging = %percentage: 2%%%{F-} label-discharging = %percentage: 2%%
format-full = <label-full> format-full = <label-full>
label-full =  label-full = 
full-at = 98 format-low = <animation-low> <label-low>
ramp-capacity-0 = %{F#ff0000} format-low-foreground = ${colors.warning}
label-low = %percentage: 2%%
full-at = 99
low-at = 5
ramp-capacity-0 = 
ramp-capacity-1 =  ramp-capacity-1 = 
ramp-capacity-2 =  ramp-capacity-2 = 
ramp-capacity-3 =  ramp-capacity-3 = 
@ -138,6 +141,9 @@ ramp-capacity-4 = 
ramp-capacity-5 =  ramp-capacity-5 = 
ramp-capacity-6 =  ramp-capacity-6 = 
ramp-capacity-7 =  ramp-capacity-7 = 
animation-low-0 = 
animation-low-1 = %{T2}%{T-}
animation-low-framerate = 1000
[module/pulseaudio] [module/pulseaudio]
type = internal/pulseaudio type = internal/pulseaudio