You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plays random music from Apple Music library, e.g.:
sgpt "play music"
# ~/.config/shell_gpt/functions/play_music.pyimportsubprocessfrominstructorimportOpenAISchemascript="""tell application "Music" set shuffle enabled to true play playlist "Library"end tell"""classFunction(OpenAISchema):
""" Starts playing music. """classConfig:
title="play_music"@classmethoddefexecute(cls):
subprocess.run(['osascript', '-e', script])
return"Success. Music is playing."
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Plays random music from Apple Music library, e.g.:
sgpt "play music"
Beta Was this translation helpful? Give feedback.
All reactions