fix(waybar): repair mute and update widgets
This commit is contained in:
@@ -1,11 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env 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
|
|
||||||
|
|
||||||
|
# Toggle the default PulseAudio sink's mute state.
|
||||||
|
amixer -D pulse sset Master toggle >/dev/null
|
||||||
|
|||||||
@@ -21,4 +21,4 @@ if [ "$updates" -gt 0 ]; then
|
|||||||
echo " ($(format $updates_arch)/$(format $updates_aur))"
|
echo " ($(format $updates_arch)/$(format $updates_aur))"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
fia
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user