working on waybar
This commit is contained in:
@@ -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))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user