From 476516d4b144e6bcd9211e0d23c829f34c0b7833 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Fri, 26 Jun 2020 19:40:25 +0200 Subject: feat: simplified volume command --- bin/vol | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 bin/vol (limited to 'bin') diff --git a/bin/vol b/bin/vol new file mode 100755 index 0000000..ea7c7a0 --- /dev/null +++ b/bin/vol @@ -0,0 +1,17 @@ +#!/bin/sh + +case $1 in + mute) + pactl set-sink-mute @DEFAULT_SINK@ toggle + ;; + [+-]*%) + pactl set-sink-volume @DEFAULT_SINK@ $1 + ;; + *) + exit 1 +esac + +PID=$(ps -a | awk '/status/ {print $1; exit}') +if [ $PID ]; then + kill -35 $PID +fi -- cgit v1.2.1