diff options
author | davidpkj <davidpenkow1@gmail.com> | 2022-12-03 22:26:26 +0100 |
---|---|---|
committer | davidpkj <davidpenkow1@gmail.com> | 2022-12-03 22:26:26 +0100 |
commit | 5d4a749b7c51649bcd3953cd1686856408d08121 (patch) | |
tree | d0ddab7d5ee206e9b4403d4f177d942ec1608aa0 /scripts/.local/bin/personal/volctl | |
parent | 4f7ccffecdfa36c5e531654b8eec44199935d497 (diff) |
Merge in dotfiles
Diffstat (limited to 'scripts/.local/bin/personal/volctl')
-rwxr-xr-x | scripts/.local/bin/personal/volctl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/.local/bin/personal/volctl b/scripts/.local/bin/personal/volctl new file mode 100755 index 0000000..6dc6e6b --- /dev/null +++ b/scripts/.local/bin/personal/volctl @@ -0,0 +1,22 @@ +#!/bin/bash + +# A script to manage the volume on my system universally + +sink="$(pactl list short sinks | grep "pci-0000_00_1b.0" | awk '{print $1}')" +volume="$(pamixer --get-volume)" + +if [ "$1" = "increase" ] +then + pactl set-sink-volume "$sink" +5% +elif [ "$1" = "decrease" ] +then + pactl set-sink-volume "$sink" -5% +elif [ "$1" = "mute" ] +then + pactl set-sink-volume "$sink" 0% +elif [ "$1" = "check" ] +then + printf "%s\n" "$volume" +else + printf "[ Error ] Not enough arguments.\n" +fi |