From 1d070ae53b694e4f42ff90fcebd62ac776a79b04 Mon Sep 17 00:00:00 2001 From: esche Date: Fri, 8 Dec 2023 13:08:47 +0100 Subject: [PATCH] simplyfied with wpctl --- .config/sway/status.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.config/sway/status.sh b/.config/sway/status.sh index 6088cda..91eb704 100644 --- a/.config/sway/status.sh +++ b/.config/sway/status.sh @@ -4,12 +4,11 @@ date_formatted=$(date "+%a %d.%m.%Y %H:%M") -audio_muted=$( - pactl get-sink-mute @DEFAULT_SINK@ | - awk '{ print $2=="yes" ? "🔇":"🔉" }') -audio_volume=$( +audio=$( wpctl get-volume @DEFAULT_SINK@ | - awk '{ print $2 }') + awk '{ + print $2 + print $3=="[MUTED]" ? "🔇":"🔉" }') is_wayland=$( swaymsg -t get_tree | @@ -29,4 +28,4 @@ battery=$( output="" if [[ $is_wayland != "" ]]; then output="$is_wayland | "; fi -echo $output $battery "|" $audio_volume $audio_muted "|" $date_formatted +echo $output $battery "|" $audio "|" $date_formatted