Skip to content

Instantly share code, notes, and snippets.

@emidln
Created July 5, 2018 14:06
Show Gist options
  • Save emidln/a491f9276dfb18cce7eed97dc5dd6506 to your computer and use it in GitHub Desktop.
Save emidln/a491f9276dfb18cce7eed97dc5dd6506 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ $(amixer -D pulse get Master | grep -E "\[on\]") ]]; then
amixer -D pulse get Master | grep -Eo "[[:digit:]]{1,3}%" | tail -1
else
echo "Muted"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment