https://github.com/user-attachments/assets/ea8e0ba2-eadc-4042-83ff-27cb81e8d79d

Open lyrics in Script Kit

// Name: Lyrics on Genius
// Description: Look up Lyrics of Current Song on Rap Genius
// Acknowledgments:
// - Ryan Rudzitis: Look up Lyrics of Current Song on Rap Genius
import "@johnlindquist/kit"
let appsToTry = [
"Music",
"Spotify"
]
let qs: string
for (let app of appsToTry) {
qs = await applescript(/* applescript */ `
tell application "${app}"
if player state is playing then
set aTrack to the current track
set aName to name of aTrack
set aArtist to artist of aTrack
return quoted form of (aArtist & " - " & aName)
else
return ""
end if
end tell
`)
if (qs) break
}
if (!qs) {
notify(`No music is playing in: ` + appsToTry.join(", "))
} else {
open(`http://genius.com/search?q=${qs}`)
}