aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/eww/bar/bar.yuck
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-09-01 19:05:27 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-09-01 19:05:27 +0530
commitdae00451562bab8357c5fb02cef46634253fd367 (patch)
tree127529a7b212bff84eb60257c2dde1cd04b1e2c7 /modules/desktop/eww/bar/bar.yuck
parent56468d7c12914a4324a24d7a795f573dff77fb8e (diff)
downloadhome-manager-config-dae00451562bab8357c5fb02cef46634253fd367.tar.gz
home-manager-config-dae00451562bab8357c5fb02cef46634253fd367.zip
desktop: added battery section to eww bar, niri overview background
- added a much needed battery section to the eww bar system-stats section - nivi overview now uses the sapling.png image as the background
Diffstat (limited to 'modules/desktop/eww/bar/bar.yuck')
-rw-r--r--modules/desktop/eww/bar/bar.yuck17
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/desktop/eww/bar/bar.yuck b/modules/desktop/eww/bar/bar.yuck
index 2f5046d..f8f48d0 100644
--- a/modules/desktop/eww/bar/bar.yuck
+++ b/modules/desktop/eww/bar/bar.yuck
@@ -4,17 +4,16 @@
(defpoll full_date :interval "60s" "date '+%A, %d %B %Y'")
(deflisten niri_status :initial "{\"workspaces\":[],\"active_windows\":[]}" "@@niri-status-script@@")
(deflisten system_stats
- :initial "{\"cpu\":{\"percent\":0,\"per_core\":[],\"freq_mhz\":null,\"load_avg\":null,\"tooltip\":\"CPU: 0%\"},\"ram\":{\"percent\":0,\"used\":\"0B\",\"total\":\"0B\",\"available\":\"0B\",\"swap_percent\":0,\"swap_used\":\"0B\",\"swap_total\":\"0B\",\"speed_mhz\":null,\"tooltip\":\"RAM: 0%\"},\"net\":{\"status\":\"down\",\"tooltip\":\"Network Offline\",\"routes\":[]},\"sound\":{\"percent\":0,\"mute\":true,\"sink\":null,\"tooltip\":\"Volume: unknown\"}}"
+ :initial "{\"cpu\":{\"percent\":0,\"per_core\":[],\"freq_mhz\":null,\"load_avg\":null,\"tooltip\":\"CPU: 0%\"},\"ram\":{\"percent\":0,\"used\":\"0B\",\"total\":\"0B\",\"available\":\"0B\",\"swap_percent\":0,\"swap_used\":\"0B\",\"swap_total\":\"0B\",\"speed_mhz\":null,\"tooltip\":\"RAM: 0%\"},\"net\":{\"status\":\"down\",\"tooltip\":\"Network Offline\",\"routes\":[]},\"sound\":{\"percent\":0,\"mute\":true,\"sink\":null,\"tooltip\":\"Volume: unknown\"},\"battery\":{\"percent\":0,\"present\":false,\"charging\":false,\"status\":\"none\",\"tooltip\":\"No battery\"}}"
"@@system-stats-script@@")
(defwindow bar
:monitor 0
- :geometry (geometry
- :x "0px"
- :y "0px"
- :width "60px"
- :height "100%"
- :anchor "top right")
+ :geometry (geometry :x "0px"
+ :y "0px"
+ :width "60px"
+ :height "100%"
+ :anchor "top right")
:stacking "fg"
:focusable "none"
:reserve (struts :distance "60px" :side "right")
@@ -71,6 +70,10 @@
:tooltip "${system_stats.ram.tooltip}"
(image :class "system-icon" :path "@@icon-ram@@" :image-width 24 :image-height 24)
(label :class "system-label" :text "${system_stats.ram.percent}%"))
+ (box :orientation "v" :class "system-item" :space-evenly false :spacing 4
+ :tooltip "${system_stats.battery.tooltip}"
+ (image :class "system-icon" :path "@@icon-battery@@" :image-width 24 :image-height 24)
+ (label :class "system-label" :text "${system_stats.battery.present ? (system_stats.battery.percent + '%') : '-'}"))
(eventbox :onclick "pamixer --toggle-mute"
:onscroll "bash -c '[ \"{}\" = \"up\" ] && pamixer --increase 5 --unmute || pamixer --decrease 5'"
:cursor "pointer" :halign "fill"