Skip to content

Instantly share code, notes, and snippets.

@kirkins
Created July 24, 2017 18:52
Show Gist options
  • Save kirkins/a66d649a7a66f9db47623fe69735a514 to your computer and use it in GitHub Desktop.
Save kirkins/a66d649a7a66f9db47623fe69735a514 to your computer and use it in GitHub Desktop.
Volume command line shortcut
# 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