From 82df70eff06e7b44ee84283070d7f801f7fc1d92 Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sat, 6 Nov 2021 20:25:45 -0400 Subject: initial commit --- .local/bin/volctl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .local/bin/volctl (limited to '.local/bin/volctl') 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 @@ +#!/bin/sh +# Script for volume control +# +# Accepts either a number and a +,- operator (volctl 5 +) or "toggle" (volctl toggle) + +# If the lone argument is "toggle", toggle mute/unmute +[ "$1" = "toggle" ] && amixer -q sset Master toggle && signal-vol && exit + +num=$1 +dir=$2 + +amixer -q sset Master $num%$dir unmute && signal-vol -- cgit v1.2.3