Created
August 4, 2011 02:13
-
-
Save danchoi/1124362 to your computer and use it in GitHub Desktop.
macvol - set your Mac's volume from the command line
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
#!/bin/bash | |
# This simple script sets the volume on your Mac. Put it on your PATH. | |
# | |
# Usage: macvol [volume level] | |
# | |
# Without an argument, it returns the current volume level. With an argument, | |
# it will set the volume level. The volume level may range from 0 to 100. | |
# | |
# I use this script to set the volume of my Mac Mini remotely from another | |
# computer over a SSH session. | |
# | |
# Author: Daniel Choi | |
# [email protected] | |
# http://danielchoi.com/software | |
if [ $# -eq 0 ] | |
then | |
osascript -e 'get output volume of (get volume settings)' | |
else | |
osascript -e "set volume output volume $1" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you know if we can change specific app volume?