Show battery power draw from sensors in waybar
Replace the built-in battery module with a custom/battery script that combines sysfs capacity/status with the power1 reading from `sensors`, displaying it as "85% (5.4W)" next to the icon.
This commit is contained in:
@@ -12,9 +12,9 @@ window#waybar { background: @bg; color: @text; }
|
||||
#workspaces button.focused { color: @bg; background: @blue; }
|
||||
#workspaces button.focused:hover { background: @blue; color: @bg; }
|
||||
#workspaces button.urgent { background: @blue-dark; color: @text; }
|
||||
#mode, #clock, #cpu, #memory, #custom-network, #pulseaudio, #backlight, #battery, #tray, #custom-power { padding: 0 10px; margin: 4px 2px; background: transparent; border-radius: 6px; }
|
||||
#mode:hover, #clock:hover, #cpu:hover, #memory:hover, #custom-network:hover, #pulseaudio:hover, #backlight:hover, #battery:hover, #tray:hover, #custom-power:hover { background: @surface; }
|
||||
#mode, #clock, #cpu, #memory, #custom-network, #pulseaudio, #backlight, #custom-battery, #tray, #custom-power { padding: 0 10px; margin: 4px 2px; background: transparent; border-radius: 6px; }
|
||||
#mode:hover, #clock:hover, #cpu:hover, #memory:hover, #custom-network:hover, #pulseaudio:hover, #backlight:hover, #custom-battery:hover, #tray:hover, #custom-power:hover { background: @surface; }
|
||||
#clock { color: @blue; font-weight: bold; background: transparent; }
|
||||
#cpu, #memory { color: @text; }
|
||||
#custom-power { color: @blue; font-size: 16px; }
|
||||
#battery.warning, #battery.critical { color: @blue; }
|
||||
#custom-battery.warning, #custom-battery.critical { color: @blue; }
|
||||
|
||||
Reference in New Issue
Block a user