diff options
Diffstat (limited to 'volsv')
-rwxr-xr-x | volsv | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#!/bin/sh +# if pulseaudio +pulsesv () { + case "$1" in + "up" | "-i") pamixer -i 5 ;; + "down" | "-d") pamixer -d 5 ;; + "toggle" | "-t") pamixer -t ;; + "mic" | "-m") pamixer --source 1 -t ;; + esac +} +# if alsa +alsasv () { + case "$1" in + "up" | "-i") amixer sset Master 5%+ ;; + "down" | "-d") amixer sset Master 5%- ;; + "toggle" | "-t") amixer sset Master toggle ;; + "mic" | "-m") amixer set Capture toggle ;; + esac +} +# check which it is +[ ! -z "$(pgrep pulseaudio)" ] && pulsesv $1 || alsasv $1 ; pkill -RTMIN+10 dwmblocks ; touch /tmp/volsv.tmp |