Skip to content

Instantly share code, notes, and snippets.

@grohith327
Created October 30, 2019 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save grohith327/5a7140d573b9416175d0b334da516260 to your computer and use it in GitHub Desktop.
Save grohith327/5a7140d573b9416175d0b334da516260 to your computer and use it in GitHub Desktop.
import osascript
vol = osascript.osascript('get volume settings')
cur_vol = int(vol[1].split(':')[1].split(',')[0])
cur_vol = cur_vol + 20
if(cur_vol > 100):
cur_vol = 100
osascript.osascript("set volume output volume "+str(cur_vol))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment