simplyfied with wpctl

This commit is contained in:
esche 2023-12-08 13:08:47 +01:00
parent 1f222800b7
commit 1d070ae53b

View file

@ -4,12 +4,11 @@
date_formatted=$(date "+%a %d.%m.%Y %H:%M") date_formatted=$(date "+%a %d.%m.%Y %H:%M")
audio_muted=$( audio=$(
pactl get-sink-mute @DEFAULT_SINK@ |
awk '{ print $2=="yes" ? "🔇":"🔉" }')
audio_volume=$(
wpctl get-volume @DEFAULT_SINK@ | wpctl get-volume @DEFAULT_SINK@ |
awk '{ print $2 }') awk '{
print $2
print $3=="[MUTED]" ? "🔇":"🔉" }')
is_wayland=$( is_wayland=$(
swaymsg -t get_tree | swaymsg -t get_tree |
@ -29,4 +28,4 @@ battery=$(
output="" output=""
if [[ $is_wayland != "" ]]; then output="$is_wayland | "; fi if [[ $is_wayland != "" ]]; then output="$is_wayland | "; fi
echo $output $battery "|" $audio_volume $audio_muted "|" $date_formatted echo $output $battery "|" $audio "|" $date_formatted