Skip to content

Instantly share code, notes, and snippets.

@dm-z
Last active January 3, 2016 11:09
Show Gist options
  • Save dm-z/8453777 to your computer and use it in GitHub Desktop.
Save dm-z/8453777 to your computer and use it in GitHub Desktop.
Decrease OS X system volume with AppleScript (can be used in Alfred2 and QuickSilver to make hotkey and use it on non Apple keyboard to control volume)
set curVolume to output volume of (get volume settings)
-- work out the new setting
if curVolume > 6 then
set newVolume to curVolume - 6
else
-- can't go over 100
set newVolume to 0
end if
-- and apply it
set volume output volume newVolume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment