diff options
Diffstat (limited to 'config.ini')
| -rw-r--r-- | config.ini | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -22,7 +22,7 @@ module-margin-right = 0 font-0 = "Fira Nerd Font:pixelsize=11:antialias=true;3" modules-left = xmonad modules-center = -modules-right = cpu memory volume date time +modules-right = cpu memory volume battery date time tray-position = right tray-padding = 6 tray-background = ${colors.bg} @@ -63,6 +63,15 @@ format-padding = 2 format-margin-left = 2 label = VOL %output% label-foreground = ${colors.fg-dim} +[module/battery] +type = custom/script +exec = now=$(cat /sys/class/power_supply/BAT0/charge_now); full=$(cat /sys/class/power_supply/BAT0/charge_full); status=$(cat /sys/class/power_supply/BAT0/status); pct=$((now * 100 / full)); suffix=""; [ "$status" = "Charging" ] && suffix=" ↑"; [ "$pct" -ge 98 ] && echo "BAT FULL" || echo "BAT ${pct}%${suffix}" +interval = 30 +format = <label> +format-background = ${colors.bg-alt} +format-padding = 2 +format-margin-left = 2 +label-foreground = ${colors.fg-dim} [module/date] type = internal/date interval = 10 |
