feat: j multiple choices

This commit is contained in:
AngeD 2023-01-17 00:31:59 +01:00
parent cb0583efab
commit b46fa62542
8 changed files with 16 additions and 16 deletions

View file

@ -2,13 +2,6 @@
set -e
SINK='@DEFAULT_SINK@'
TMP_FILE='/tmp/set-vol'
for _ in 1 2 3; do
[ -f "$TMP_FILE" ] || break
sleep 0.03
done
touch "$TMP_FILE"
VOL="$(pactl get-sink-volume "$SINK")"
VOL="$(grep -Po '\d+(?=%)' <<< "$VOL" | head -n 1)"
@ -32,8 +25,6 @@ esac
pactl set-sink-volume "$SINK" "$VOL%"
pactl set-sink-mute "$SINK" 0
rm "$TMP_FILE"
if [ -t 1 ]; then
echo "$VOL"
fi