sxmo: waybar: include the volume sxmo status (i.e. microphone/headphones)

This commit is contained in:
2023-12-01 08:45:31 +00:00
parent 3193028c48
commit 3fa676e169
3 changed files with 13 additions and 1 deletions

View File

@@ -59,6 +59,8 @@ window#waybar {
#cpu,
#custom-media,
#custom-swaync,
#custom-sxmo,
#custom-sxmo-sane,
#disk,
#idle_inhibitor,
#memory,

View File

@@ -9,6 +9,7 @@
# - modem-tech
# - modem-signal
# - wifi-status
# - volume
# sxmo_hook_statusbar.sh assumes:
# - mmcli, jq on PATH
@@ -68,6 +69,9 @@ setitem() {
wifi-status)
wifi_status="$value"
;;
volume)
volume="$value"
;;
esac
}
@@ -102,6 +106,12 @@ while [ -n "$*" ]; do
fi
echo -n "$wifi_status"
;;
"volume")
if [ -z "$volume" ]; then
eval "$(sxmo_hook_statusbar.sh volume)"
fi
echo -n "$volume"
;;
*)
echo -n "UNK: $variable"
;;

View File

@@ -43,7 +43,7 @@ in
# so it works even without the "statusbar periodics" sxmo service running.
interval = 2;
format = "{}";
exec = "${waybar-sxmo-status}/bin/waybar-sxmo-status modem-state modem-tech modem-signal wifi-status";
exec = "${waybar-sxmo-status}/bin/waybar-sxmo-status modem-state modem-tech modem-signal wifi-status volume";
};
"custom/sxmo" = {