diff --git a/.config/waybar/scripts/amixer-toggle.sh b/.config/waybar/scripts/amixer-toggle.sh index ca45bba..9a7b4ae 100755 --- a/.config/waybar/scripts/amixer-toggle.sh +++ b/.config/waybar/scripts/amixer-toggle.sh @@ -1,11 +1,4 @@ -#!/bin/bash - -# Check the current state of the speaker -state=$(amixer -D pulse sget Master | awk '/\[on\]/{print "unmute"; exit} /\[off\]/{print "mute"; exit}') - -# Toggle the state of the speaker -# -if [ "$state" = "[on] "]; then - amixer -# amixer -D pulse sset Master "$state" > /dev/null +#!/usr/bin/env bash +# Toggle the default PulseAudio sink's mute state. +amixer -D pulse sset Master toggle >/dev/null diff --git a/.config/waybar/scripts/myUpdates.sh b/.config/waybar/scripts/myUpdates.sh index 5011866..5061371 100755 --- a/.config/waybar/scripts/myUpdates.sh +++ b/.config/waybar/scripts/myUpdates.sh @@ -1,24 +1,24 @@ #!/bin/bash format() { - if [ "$1" -eq 0 ]; then - echo '-' - else - echo "$1" - fi + if [ "$1" -eq 0 ]; then + echo '-' + else + echo "$1" + fi } if ! updates_arch="$(checkupdates | wc -l)"; then - updates_arch=0 + updates_arch=0 fi if ! updates_aur="$(yay -Qum 2>/dev/null | wc -l)"; then - updates_aur=0 + updates_aur=0 fi updates="$((updates_arch + updates_aur))" if [ "$updates" -gt 0 ]; then - echo " ($(format $updates_arch)/$(format $updates_aur))" + echo " ($(format $updates_arch)/$(format $updates_aur))" else - echo -fia + echo +fi