feat: cleanup
This commit is contained in:
parent
b9f126b1a6
commit
96b5d2aceb
4 changed files with 13 additions and 10 deletions
|
@ -16,6 +16,8 @@ set +e
|
|||
CUR="$(cat "$CUR_FILE" || echo 50)"
|
||||
set -e
|
||||
|
||||
CUR="$((CUR - CUR % "$1"))"
|
||||
|
||||
case "${1:0:1}" in
|
||||
'')
|
||||
exit 1
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
CUR="$(pactl get-sink-volume "@DEFAULT_SINK@" | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')"
|
||||
SINK='@DEFAULT_SINK@'
|
||||
CUR="$(pactl get-sink-volume "$DEFAULT_SINK" | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')"
|
||||
CUR="$((CUR - CUR % "$1"))"
|
||||
|
||||
case "${1:0:1}" in
|
||||
|
@ -19,7 +20,7 @@ esac
|
|||
[ "$NEW" -lt 0 ] && NEW=0
|
||||
[ "$NEW" -gt 100 ] && NEW=100
|
||||
|
||||
pactl set-sink-volume "${SINK}" "$NEW"%
|
||||
pactl set-sink-mute "${SINK}" 0
|
||||
pactl set-sink-volume "$SINK" "$NEW%"
|
||||
pactl set-sink-mute "$SINK" 0
|
||||
|
||||
echo "$NEW"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue