working on waybar

This commit is contained in:
2026-03-11 20:32:34 +01:00
parent 2da3c4bd30
commit e312f5a645
5 changed files with 351 additions and 352 deletions
+6 -4
View File
@@ -56,13 +56,15 @@
(setq pulseaudio-muted (exec "pamixer --get-mute"))
(if (string= pulseaudio-muted "true")
(eww update pulseaudio_label="\uF026")
(eww update pulseaudio_label=(strfmt "{}% {}" pulseaudio-volume (if (> (string->number pulseaudio-volume) 50) "\uF028" "\uF027")))
(eww update pulseaudio_label=(strfmt "{}% {}" pulseaudio-volume (if (> (string->number pulseaudio-volume) 50) "\uF028" "\uF027"))
)
;; Update network status
(setq network-essid (exec "nmcli -t -f TYPE,NAME dev status | awk -F: '/wifi/{print $2}'"))
(if (string-empty? network-essid)
(eww update network_label="Disconnected !")
(eww update network_label=(strfmt "\uF1EB ({})" network-essid)))
(eww update network_label=(strfmt "\uF1EB ({})" network-essid))
)
;; Update clock
(eww update clock_label=(strftime "%a, %d %b %Y - %H:%M"))
@@ -72,5 +74,5 @@
(setq battery-status (exec "cat /sys/class/power_supply/BAT0/status"))
(if (string= battery-status "Charging")
(eww update battery_label=(strfmt "{}% \uF0E4" battery-capacity))
(eww update battery_label=(strfmt "{}% \uF079" battery-capacity)))
)
(eww update battery_label=(strfmt "{}% \uF079" battery-capacity))
)