aboutsummaryrefslogtreecommitdiff
path: root/.config/polybar/config.ini
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-08-02 12:25:59 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-08-02 12:25:59 +0530
commit40c90b49605a33e8e4be378ea78ac264e9f9577d (patch)
tree36cb0eadd7bee03e4de25a31a2c2939b3390d1e1 /.config/polybar/config.ini
parent31be34e3af6bc28b265f143784382cbf335c72ee (diff)
added battery module to polybar and removed cbatticon from XMonad startup
Diffstat (limited to '.config/polybar/config.ini')
-rw-r--r--.config/polybar/config.ini37
1 files changed, 35 insertions, 2 deletions
diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini
index 5e4bcb8..2786f49 100644
--- a/.config/polybar/config.ini
+++ b/.config/polybar/config.ini
@@ -76,6 +76,15 @@ vol-fg = ${colors.module-color-0}
vol-bg = ${colors.module-bg}
vol-fg-alt = #c32aeb
+batt-charging-bg = ${colors.module-bg}
+batt-charging-fg = ${colors.module-color-0}
+
+batt-discharging-bg = ${colors.module-bg}
+batt-discharging-fg = ${colors.module-color-1}
+
+batt-full-bg = ${colors.module-bg}
+batt-full-fg = ${colors.module-color-0}
+
[bar/mybar]
;monitor = ${env:MONITOR:eDP-1-1}
enable-ipc = true
@@ -111,7 +120,7 @@ font-3 = fixed:pixelsize=10;1
modules-left = date uptime wlan eth filesystem-root filesystem-home filesystem-hdd cpu temperature memory xwindow
;modules-center = xwindow
-modules-right = pulseaudio ewmh
+modules-right = pulseaudio ewmh battery
tray-position = right
tray-padding = 2
@@ -273,7 +282,31 @@ screenchange-reload = true
margin-top = 0
margin-bottom = 0
-; vim:ft=dosini
+[module/battery]
+type = internal/battery
+
+; This is useful in case the battery never reports 100% charge
+full-at = 100
+
+; Use the following command to list batteries and adapters:
+; $ ls -1 /sys/class/power_supply/
+battery = BAT0
+adapter = ADP1
+
+poll-interval = 5
+
+label-full =
+label-discharging = " BATT: %percentage%% "
+label-charging = " BATT: %percentage%% "
+
+label-charging-background = ${colors.batt-charging-bg}
+label-charging-foreground = ${colors.batt-charging-fg}
+
+label-discharging-background = ${colors.batt-discharging-bg}
+label-discharging-foreground = ${colors.batt-discharging-fg}
+
+label-full-background = ${colors.batt-full-bg}
+label-full-foreground = ${colors.batt-full-fg}
[module/ewmh]
type = internal/xworkspaces