Updated battery definition to latest.

This commit is contained in:
Joachim Nielandt 2023-05-07 10:17:15 +02:00
parent a36c80eb72
commit b2947d2275

View File

@ -86,6 +86,8 @@ padding-right = 5
;font-2 = "Inconsolata\ For\ Powerline:pixelsize=10;1" ;font-2 = "Inconsolata\ For\ Powerline:pixelsize=10;1"
;font-0 = FuraCode Nerd Font:pixelsize=11;1 ;font-0 = FuraCode Nerd Font:pixelsize=11;1
font-0 = Hasklug Nerd Font Mono:pixelsize=9;1 font-0 = Hasklug Nerd Font Mono:pixelsize=9;1
; larger variant for icons if they're too small (use %{T2}x%{T-})
font-1 = Hasklug Nerd Font Mono:pixelsize=14;1
;font-1 = Siji:style=Regular:pixelsize=11 ;font-1 = Siji:style=Regular:pixelsize=11
;font-1 = Siji:pixelsize=14;0 ;font-1 = Siji:pixelsize=14;0
; override pointers ; override pointers
@ -154,7 +156,7 @@ exec = ~/scripts/gpu.temp.sh
tail = true tail = true
label = "%output%°C" label = "%output%°C"
label-foreground = ${colors.light0_hard} label-foreground = ${colors.light0_hard}
format-prefix = " " format-prefix = "%{T2}󱣾%{T-} "
format-prefix-foreground = ${colors.bright_green} format-prefix-foreground = ${colors.bright_green}
interval = 5 interval = 5
@ -641,40 +643,132 @@ bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.bright_green} bar-volume-empty-foreground = ${colors.bright_green}
[module/battery] [module/battery]
;https://github.com/polybar/polybar/wiki/Module:-battery
type = internal/battery type = internal/battery
; This is useful in case the battery never reports 100% charge
; Default: 100
full-at = 98
; format-low once this charge percentage is reached
; Default: 10
; New in version 3.6.0
low-at = 5
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0 battery = BAT0
adapter = AC adapter = AC
full-at = 97
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
; see "man date" for details on how to format the time string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; Default: %H:%M:%S
time-format = %H:%M time-format = %H:%M
label-charging = "  %time% %percentage%%" ; Available tags:
; <label-charging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-charging>
format-charging = <animation-charging> <label-charging> format-charging = <animation-charging> <label-charging>
;format-charging-underline = #ffb52a
;format-charging-underline = ${colors.underline-battery}
label-discharging = "  %time% %percentage%%" ; Available tags:
; <label-discharging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-discharging>
format-discharging = <ramp-capacity> <label-discharging> format-discharging = <ramp-capacity> <label-discharging>
;format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " " ; Available tags:
format-full-prefix-foreground = ${colors.bright_green} ; <label-full> (default)
;format-full-underline = ${self.format-charging-underline} ; <bar-capacity>
; <ramp-capacity>
format-full = <ramp-capacity> <label-full>
ramp-capacity-0 = " " ; Format used when battery level drops to low-at
ramp-capacity-1 = " " ; If not defined, format-discharging is used instead.
ramp-capacity-2 = " " ; Available tags:
ramp-capacity-3 = " " ; <label-low>
ramp-capacity-4 = " " ; <animation-low>
; <bar-capacity>
; <ramp-capacity>
; New in version 3.6.0
format-low = <label-low> <animation-low>
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current charge rate in watts)
label-charging = "  %time% %percentage%%"
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current discharge rate in watts)
label-discharging = "  %time% %percentage%%"
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
label-full = Fully charged
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current discharge rate in watts)
; New in version 3.6.0
label-low = BATTERY LOW
; Only applies if <ramp-capacity> is used
ramp-capacity-0 = "%{T2}%{T-} "
ramp-capacity-1 = "%{T2}%{T-} "
ramp-capacity-2 = "%{T2}%{T-} "
ramp-capacity-3 = "%{T2}%{T-} "
ramp-capacity-4 = "%{T2}%{T-} "
ramp-capacity-foreground = ${colors.bright_green} ramp-capacity-foreground = ${colors.bright_green}
; Only applies if <bar-capacity> is used
bar-capacity-width = 10
; Only applies if <animation-charging> is used
animation-charging-0 =  animation-charging-0 = 
animation-charging-1 =  animation-charging-1 = 
animation-charging-2 =  animation-charging-2 = 
animation-charging-3 =  animation-charging-3 = 
animation-charging-4 =  animation-charging-4 = 
animation-charging-foreground = ${colors.bright_green} ; Framerate in milliseconds
animation-charging-framerate = 750 animation-charging-framerate = 750
animation-charging-foreground = ${colors.bright_green}
; Only applies if <animation-discharging> is used
animation-discharging-0 = "%{T2}%{T-} "
animation-discharging-1 = "%{T2}%{T-} "
animation-discharging-2 = "%{T2}%{T-} "
animation-discharging-3 = "%{T2}%{T-} "
animation-discharging-4 = "%{T2}%{T-} "
; Framerate in milliseconds
animation-discharging-framerate = 500
animation-discharging-foreground = ${colors.bright_orange}
; Only applies if <animation-low> is used
; New in version 3.6.0
animation-low-0 = !
animation-low-1 =
animation-low-framerate = 200
[module/temperature] [module/temperature]
type = internal/temperature type = internal/temperature