Using Quicksilver Mac and AppleScript to Adjust System Volume

Extendible to command line

I’ve been using Quicksilver for a while, and I’d heard of how powerful but never taken advantage of it. I wanted to adjust the system volume through Quicksilver: right now, I have to use fn + f10 / f11 / f12 to adjust volume, since I chose to have f1-f12 map to the normal keys.

It seems that there’s actually no Quicksilver plugin for system volume – only iTunes volume – but it’s pretty simple to do with AppleScripts. It’s not documented everywhere, so I thought I’d add it here.

Volume AppleScripts

The AppleScripts below will adjust the system volume, which is measured on a scale of 0 - 100. Here’s a download link for these three scripts. To use them in Quicksilver, add them to the catalog, and opening them in Quicksilver should run them by default.

Decrease volume
# Decrease\ Volume.scpt
set currentVolume to output volume of (get volume settings)
set volume output volume (currentVolume - 10)
Increase volume
# Increase\ Volume.scpt
set currentVolume to output volume of (get volume settings)
set volume output volume (currentVolume + 10)
Mute volume
# Mute\ Volume.scpt
set isMuted to output muted of (get volume settings)
set volume output muted not isMuted

Using in command line

To run an AppleScript file in the command line, run:

$ osascript /path/to/file

These files have spaces in them so that it looks cleaner in Quicksilver, but you can alias the commands appropriately.

Comments