I’ve been using Alfred for quite a while now and recently moved to a mechanical PC keyboard at my office. One of the problems that I faced is that I cannot change my system volume as I use F(x) keys exclusively for coding shortcuts and the lack of a Function (Fn) key on a PC keyboard left me screwed.
Alfred supports volume manipulation but only for iTunes. I wanted something that manipulates the system volume and hence had to use AppleScript and hotkeys combination. Here is a step-by-step tutorial for this.
- Create two AppleScripts within Alfred -> Extensions and give appropriate names. Set the “AppleScript” field to the script below
First one to increase the volume by 10% and other to reduce by 10%. You can change the 10 to any value you would like to increment/decrement with:AppleScript123on alfred_script(q)set volume output volume ((output volume of (get volume settings)) + 10)end alfred_scriptAppleScript123on alfred_script(q)set volume output volume ((output volume of (get volume settings)) - 10)end alfred_script
- Create two hotkeys using the “+” -> Extensions -> AppleScript option from within the “HotKeys” tab and set each to the AppleScripts we created above. My bindings were ^F11 and ^F12 for down and up respectively.
You should now be able to manage the system sound.