mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Update sb-volume
Now compatible with muteinputs
This commit is contained in:
parent
505c4a4a13
commit
4192971e8b
@ -1,6 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Prints the current volume or 🔇 if muted.
|
if [ "$(pamixer --get-mute)" = "true" ]; then
|
||||||
|
printf "🔇 $(pamixer --get-volume)%%"
|
||||||
|
else
|
||||||
|
printf "🔊 $(pamixer --get-volume)%%"
|
||||||
|
fi
|
||||||
|
|
||||||
|
source="$(pamixer --list-sources | awk '!/Built/{ if (NR==2) {print $1} }')"
|
||||||
|
if [ "$(pamixer --source $source --get-mute)" = "false" ]; then
|
||||||
|
printf " 🎙️\n"
|
||||||
|
fi
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
case $BLOCK_BUTTON in
|
||||||
1) setsid -f "$TERMINAL" -e pulsemixer ;;
|
1) setsid -f "$TERMINAL" -e pulsemixer ;;
|
||||||
@ -12,17 +21,3 @@ case $BLOCK_BUTTON in
|
|||||||
- Scroll to change." ;;
|
- Scroll to change." ;;
|
||||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ $(pamixer --get-mute) = true ] && echo 🔇 && exit
|
|
||||||
|
|
||||||
vol="$(pamixer --get-volume)"
|
|
||||||
|
|
||||||
if [ "$vol" -gt "70" ]; then
|
|
||||||
icon="🔊"
|
|
||||||
elif [ "$vol" -lt "30" ]; then
|
|
||||||
icon="🔈"
|
|
||||||
else
|
|
||||||
icon="🔉"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$icon$vol%"
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user