diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-09-10 22:34:57 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-09-10 22:34:57 +0530 |
commit | b33be93e68fdb0db3fe79d206d8d65559624899c (patch) | |
tree | 4d7f4200d511bd961c24967d004040a4d17743e4 | |
parent | 34d93d7b3ee771a10eaa99bd0065a432c7bc065d (diff) |
added polydoro to polybar, and turning battery widget red on low battery
-rw-r--r-- | .config/polybar/bars.ini | 4 | ||||
-rw-r--r-- | .config/polybar/colors.ini | 3 | ||||
-rw-r--r-- | .config/polybar/modules.ini | 21 |
3 files changed, 25 insertions, 3 deletions
diff --git a/.config/polybar/bars.ini b/.config/polybar/bars.ini index 9ac7417..7cc3343 100644 --- a/.config/polybar/bars.ini +++ b/.config/polybar/bars.ini @@ -32,7 +32,7 @@ font-3 = "Hack Nerd Font:style=Regular:size=20;5" font-4 = "Source Han Sans JP:style=Heavy:size=11;2" # font-1 but bold, make sure to edit accordingly modules-left = powerline0 date powerline1 wlan eth powerline2 storage-root powerline1 storage-home powerline2 cpu powerline1 temperature powerline2 memory powerline4 xwindow -modules-right = ewmh pulseaudio battery systray +modules-right = polydoro pulseaudio ewmh battery systray [bar/mybar] monitor = ${env:MONITOR:eDP-1} @@ -69,4 +69,4 @@ font-3 = "Hack Nerd Font:style=Regular:size=20;5" font-4 = "Source Han Sans JP:style=Heavy:size=11;2" # font-1 but bold, make sure to edit accordingly modules-left = powerline0 date powerline1 wlan eth powerline2 storage-root powerline1 storage-home powerline2 cpu powerline1 temperature powerline2 memory powerline1 backlight powerline3 xwindow -modules-right = ewmh pulseaudio battery systray +modules-right = polydoro pulseaudio ewmh battery systray diff --git a/.config/polybar/colors.ini b/.config/polybar/colors.ini index 7a27d76..9030d8f 100644 --- a/.config/polybar/colors.ini +++ b/.config/polybar/colors.ini @@ -69,6 +69,9 @@ batt-charging-fg = ${colors.foreground-alt} batt-discharging-bg = ${colors.peach} batt-discharging-fg = ${colors.foreground-alt} +batt-low-bg = ${colors.red} +batt-low-fg = ${colors.foreground-alt} + batt-full-bg = ${colors.background} batt-full-fg = ${colors.module-color-0} diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini index ede850e..24fda55 100644 --- a/.config/polybar/modules.ini +++ b/.config/polybar/modules.ini @@ -128,14 +128,19 @@ label-foreground = ${colors.temp-fg} [module/battery] type = internal/battery +low-at = 30 full-at = 100 battery = BAT0 adapter = ADP1 poll-interval = 5 -label-full = label-charging = " %{T3} %{T-}%percentage%% " label-discharging = " %{T3} %{T-}%percentage%% " +label-low = " %{T3} %{T-}%percentage%% " +label-full = + +# for some reason it won't work properly without this +format-low = <label-low> label-charging-background = ${colors.batt-charging-bg} label-charging-foreground = ${colors.batt-charging-fg} @@ -143,6 +148,9 @@ label-charging-foreground = ${colors.batt-charging-fg} label-discharging-background = ${colors.batt-discharging-bg} label-discharging-foreground = ${colors.batt-discharging-fg} +label-low-background = ${colors.batt-low-bg} +label-low-foreground = ${colors.batt-low-fg} + label-full-background = ${colors.batt-full-bg} label-full-foreground = ${colors.batt-full-fg} @@ -209,3 +217,14 @@ tray-background = ${colors.systray-bg} tray-foreground = ${colors.systray-fg} tray-spacing = 8px + +[module/polydoro] +type = custom/script + +exec = FORMAT_WORK_IDLE=" Task {counter}" FORMAT_BREAK_IDLE="%{F#89b4fa} Break {counter}%{F-}" FORMAT_LONG_BREAK_IDLE="%{F#a6e3a1} Long Break%{F-}" FORMAT_WORK="%{F#94e2d5} {time}" FORMAT_BREAK="%{F#89b4fa} {time}%{F-}" FORMAT_LONG_BREAK="%{F#a6e3a1} {time}%{F-}" FORMAT_WORK_PAUSED="%{F#94e2d5} {counter} - {time}" FORMAT_BREAK_PAUSED="%{F#89b4fa} {counter} - {time}%{F-}" FORMAT_LONG_BREAK_PAUSED="%{F#a6e3a1} {time}%{F-}" polydoro -l + +tail = true +format-padding = 2 +click-left = polydoro toggle +click-middle = polydoro skip +click-right = polydoro reset |