random($foo)

Changing Volume in OS X in the Command Line #

random($foo) is the personal site of Leonard Lin, where I collect shiny things and publish original writing and code. more »

One of the things that seems to have disappeared recently (certainly doesn’t work in Lion) is half-increment volume changing. This is quite inconvenient when I’m using some more sensitive headphones.

That was the impetus for the latest addition to my bashrc, a helper function that lets you set volume in the command line (scale is 0-100):

vol () { osascript -e "set volume output volume $*"; }

Tags: ,