summaryrefslogtreecommitdiff
path: root/.local/bin/volctl
blob: faa8de6022fec9c5863ab28470516dfd04577c98 (plain)
1
2
3
4
5
6
7
8
9
10
11
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