summaryrefslogtreecommitdiff
path: root/.local/bin/volctl
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2021-11-06 20:25:45 -0400
committerSam Chudnick <sam@chudnick.com>2021-11-06 20:25:45 -0400
commit82df70eff06e7b44ee84283070d7f801f7fc1d92 (patch)
treed17ea9cc6e012b16ff0cdeffcf4a97b5e5cd2d11 /.local/bin/volctl
initial commit
Diffstat (limited to '.local/bin/volctl')
-rwxr-xr-x.local/bin/volctl12
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/bin/volctl b/.local/bin/volctl
new file mode 100755
index 0000000..faa8de6
--- /dev/null
+++ b/.local/bin/volctl
@@ -0,0 +1,12 @@
1#!/bin/sh
2# Script for volume control
3#
4# Accepts either a number and a +,- operator (volctl 5 +) or "toggle" (volctl toggle)
5
6# If the lone argument is "toggle", toggle mute/unmute
7[ "$1" = "toggle" ] && amixer -q sset Master toggle && signal-vol && exit
8
9num=$1
10dir=$2
11
12amixer -q sset Master $num%$dir unmute && signal-vol