Created
July 24, 2017 18:52
-
-
Save kirkins/a66d649a7a66f9db47623fe69735a514 to your computer and use it in GitHub Desktop.
Volume command line shortcut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get audio level or set audio level | |
function volume() { | |
if [ $# -eq 0 ] | |
then | |
awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master) | |
else | |
amixer -D pulse sset Master $1% | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment