diff options
Diffstat (limited to 'Scripts/.local/scripts/status')
-rwxr-xr-x | Scripts/.local/scripts/status/music | 3 | ||||
-rwxr-xr-x | Scripts/.local/scripts/status/volume | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Scripts/.local/scripts/status/music b/Scripts/.local/scripts/status/music index b7233d9..a1e734e 100755 --- a/Scripts/.local/scripts/status/music +++ b/Scripts/.local/scripts/status/music @@ -1,3 +1,4 @@ #!/usr/bin/env bash -echo "$(playerctl --player=spotify metadata title)" +title=$(playerctl --player=spotify metadata title) +echo "${title::40}" diff --git a/Scripts/.local/scripts/status/volume b/Scripts/.local/scripts/status/volume index 87cb121..cbbafbe 100755 --- a/Scripts/.local/scripts/status/volume +++ b/Scripts/.local/scripts/status/volume @@ -1,5 +1,11 @@ #!/usr/bin/env bash sinks="$(pactl list sinks)" vol="$(echo "$sinks" | grep '[0-9]\+%' | sed "s,.* \([0-9]\+\)%.*,\1,;1q")" - -echo " $vol%" +mute="$(echo "$sinks" | grep "Mute: " | sed "s/.*Mute: //g")" +case "$mute" in + "no") + printf "";; + "yes") + printf "";; +esac +echo " $vol%" |