aboutsummaryrefslogtreecommitdiffstats
path: root/volumecontrol
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-05-16 01:32:08 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2015-05-16 01:32:08 +0200
commitdda107bb1eac16855209e4e6d86e6cf5c7d676e8 (patch)
tree71a395da494f4f9ca15678e51ee148a18fdcc31d /volumecontrol
parent668753b7a2cde64a7a5ee424bc115d6e054efb68 (diff)
downloadbin-dda107bb1eac16855209e4e6d86e6cf5c7d676e8.tar.xz
volumecontrol.bash: Strip .bash extension
Diffstat (limited to 'volumecontrol')
-rwxr-xr-xvolumecontrol19
1 files changed, 19 insertions, 0 deletions
diff --git a/volumecontrol b/volumecontrol
new file mode 100755
index 0000000..285d029
--- /dev/null
+++ b/volumecontrol
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+if [[ -n "$2" ]]; then
+ step=$2
+else
+ step=5
+fi
+
+case $1 in
+ lower)
+ amixer -D pulse -q set Master $step%-
+ ;;
+ raise)
+ amixer -D pulse -q set Master $step%+
+ ;;
+ mute)
+ amixer -D pulse -q set Master toggle
+ ;;
+esac