Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python2
- #ln -sf alsaget.py /usr/bin/alsaget
- import sys
- import alsaaudio
- arg = sys.argv[1]
- mixer = alsaaudio.Mixer("Master")
- def get_volume():
- volume = int(mixer.getvolume()[0])
- print volume
- def get_mute():
- mute = int(mixer.getmute()[0])
- print mute
- functions = {"volume": get_volume, "mute": get_mute}
- functions[arg]()
Advertisement
Add Comment
Please, Sign In to add comment