From 8b4106ec9354e8dfa31b86dd2650e9d92ddef2d7 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Fri, 14 Feb 2020 08:20:41 +0000 Subject: [PATCH] Battery now shows time left. Added second battery module to show current discharge rate in W. --- arch-config/.config/polybar/i3config | 30 +++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/arch-config/.config/polybar/i3config b/arch-config/.config/polybar/i3config index ae850f87..da8d8c58 100644 --- a/arch-config/.config/polybar/i3config +++ b/arch-config/.config/polybar/i3config @@ -121,7 +121,7 @@ font-2 = "Noto Sans:size=10;0" font-3 = "Noto Sans Mono:size=10;0" modules-left = i3 xwindow -modules-center = cpu1 memory2 +modules-center = cpu1 memory2 battery2 modules-right = battery date volume wired-network wireless-network separator = | @@ -392,15 +392,16 @@ type = internal/battery battery = BAT0 adapter = AC0 full-at = 100 +time-format = %H:%M format-charging = -label-charging =  %percentage%% +label-charging =  %percentage%% %time% left format-charging-foreground = ${colors.foreground} format-charging-background = ${colors.background} format-charging-underline = #a3c725 format-discharging = -label-discharging =  %percentage%% +label-discharging =  %percentage%% %time% left format-discharging-underline = #c7ae25 format-discharging-foreground = ${colors.foreground} format-discharging-background = ${colors.background} @@ -430,6 +431,29 @@ animation-charging-framerate = 750 ################################################################################ +[module/battery2] +;https://github.com/jaagr/polybar/wiki/Module:-battery +type = internal/battery +battery = BAT0 +adapter = AC0 +full-at = 100 + +format-charging = +label-charging = %consumption%W +format-charging-foreground = ${colors.foreground} +format-charging-background = ${colors.background} +format-charging-underline = #a3c725 + +format-discharging = +label-discharging = %consumption%W +format-discharging-underline = #c7ae25 +format-discharging-foreground = ${colors.foreground} +format-discharging-background = ${colors.background} + + +################################################################################ + + [module/compton] ;https://github.com/jaagr/polybar/wiki/User-contributed-modules#compton type = custom/script