Created
January 31, 2022 17:55
-
-
Save mikeyp/9df4c379178c32b14aac6c5ebe4b8648 to your computer and use it in GitHub Desktop.
Control Tidal with Hammerspoon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function togglePlayPause() | |
hs.applescript([[ | |
tell application "System Events" | |
tell process "TIDAL" | |
click menu item 0 of menu "Playback" of menu bar 1 | |
end tell | |
end tell | |
]]) | |
end | |
local function nextTrack() | |
hs.applescript([[ | |
tell application "System Events" | |
tell process "TIDAL" | |
click menu item "Next" of menu "Playback" of menu bar 1 | |
end tell | |
end tell | |
]]) | |
end | |
local function previousTrack() | |
hs.applescript([[ | |
tell application "System Events" | |
tell process "TIDAL" | |
click menu item "Previous" of menu "Playback" of menu bar 1 | |
end tell | |
end tell | |
]]) | |
end | |
local module = { | |
togglePlayPause = togglePlayPause, | |
nextTrack = nextTrack, | |
previousTrack = previousTrack | |
} | |
return module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment