Add battery stats to polybar
This commit is contained in:
parent
e2683335c8
commit
1a9417c90c
1 changed files with 29 additions and 1 deletions
|
@ -23,7 +23,7 @@ font-1 = "FontAwesome5FreeSolid:size=8;2"
|
||||||
|
|
||||||
modules-left = i3 xwindow
|
modules-left = i3 xwindow
|
||||||
modules-center = date
|
modules-center = date
|
||||||
modules-right = player_mpris_tail memory cpu pulseaudio power-menu
|
modules-right = player_mpris_tail memory cpu pulseaudio {% if ansible_fqdn == "TOO-Laptop" %}wattage battery{% endif %} power-menu
|
||||||
|
|
||||||
module-margin = 2
|
module-margin = 2
|
||||||
|
|
||||||
|
@ -112,3 +112,31 @@ menu-0-1 = Restart
|
||||||
menu-0-1-foreground = #0F0
|
menu-0-1-foreground = #0F0
|
||||||
label-separator = " | "
|
label-separator = " | "
|
||||||
expand-right = false
|
expand-right = false
|
||||||
|
|
||||||
|
[module/battery]
|
||||||
|
type = internal/battery
|
||||||
|
full-at = 100
|
||||||
|
poll-interval = 1
|
||||||
|
time-format = %H:%M
|
||||||
|
ramp-capacity-0 =
|
||||||
|
ramp-capacity-1 =
|
||||||
|
ramp-capacity-2 =
|
||||||
|
ramp-capacity-3 =
|
||||||
|
ramp-capacity-4 =
|
||||||
|
animation-charging-framerate = 500
|
||||||
|
animation-charging-0 = ${self.ramp-capacity-0}
|
||||||
|
animation-charging-1 = ${self.ramp-capacity-1}
|
||||||
|
animation-charging-2 = ${self.ramp-capacity-2}
|
||||||
|
animation-charging-3 = ${self.ramp-capacity-3}
|
||||||
|
animation-charging-4 = ${self.ramp-capacity-4}
|
||||||
|
animation-discharging-framerate = ${self.animation-charging-framerate}
|
||||||
|
format-charging = <animation-charging> <label-charging>
|
||||||
|
format-discharging = <ramp-capacity> <label-discharging>
|
||||||
|
label-discharging = %percentage%% (%time%)
|
||||||
|
|
||||||
|
[module/wattage]
|
||||||
|
type = internal/battery
|
||||||
|
full-at = ${module/battery.full-at}
|
||||||
|
label-discharging = %consumption%W
|
||||||
|
label-charging = %consumption%W
|
||||||
|
poll-interval = ${module/battery.poll-interval}
|
||||||
|
|
Loading…
Reference in a new issue