diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2024-07-24 21:12:09 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2024-07-24 21:12:09 +0400 |
commit | 9f60a2b5ec9ae08d846bc7d3b61612aacadf82c8 (patch) | |
tree | e19b0956f0163e77573b6dff8b9e4736b045dcb8 /scripts/setvol | |
parent | 994ef6afb490f5119a43fc7ae6c6b78e1c0445e4 (diff) |
Wallpaper and volume scrips were renamed
Diffstat (limited to 'scripts/setvol')
-rwxr-xr-x | scripts/setvol | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/scripts/setvol b/scripts/setvol deleted file mode 100755 index 4bbc1ec..0000000 --- a/scripts/setvol +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -err() { - printf "${1} \n" - exit 1 -} - -help() { -cat << EOF -$0: Wrapper script to change volume - -options: - -i [Vol] Increase volume by Vol - -d [Vol] Decrease volume by Vol - -s [Vol] Set volume to Vol - -p Show the current volume - -t Toggle between mute and unmute - -h Print this message and exit -EOF -} - -if [ $# != 1 ] && [ $# != 2 ]; then - err "${0}: Invalid usage\nTry \'$0 -h\' for help." -fi - -while getopts "i:d:s:pth" option; do - case "${option}" in - i) - pactl set-sink-volume @DEFAULT_SINK@ +"${OPTARG}"% \ - > /dev/null 2>&1 && exit 0 \ - || err "${0}: Failed to increase" - ;; - d) - pactl set-sink-volume @DEFAULT_SINK@ -"${OPTARG}"% \ - > /dev/null 2>&1 && exit 0 \ - || err "${0}: Failed to decrease" - ;; - s) - pactl set-sink-volume @DEFAULT_SINK@ "${OPTARG}"% \ - > /dev/null 2>&1 && exit 0 \ - || err "${0}: Failed to set" - ;; - p) - pactl get-sink-volume @DEFAULT_SINK@ 2>/dev/null\ - || err "${0}: Failed" - ;; - t) - pactl set-sink-volume @DEFAULT_SINK@ toggle \ - > /dev/null 2>&1 && exit 0 \ - || err "${0}: Failed to toggle" - ;; - h) - help - exit 0 - ;; - *) - err "Try \'${0} -h\' for help" - - ;; - - esac -done |