Notchify - Spotify in the Notch

I’ve tested it again with a new folder path, and it still works fine for me. You might need to change three paths from the following:

tell application "BetterTouchTool"
	
	set isRunning to is_app_running "Spotify"
	if isRunning then
		
		tell application "Spotify"
			if player state is playing then
				set currentTrack to current track
				set artistName to artist of currentTrack
				set trackName to name of currentTrack
				
				set albumCoverUrl to artwork url of currentTrack
				set albumCoverPath to "/Users/hackettlai/Pictures/test/Spotify_cover.png"
				do shell script "curl " & quoted form of albumCoverUrl & " -o " & quoted form of albumCoverPath
				
			else
				return " "
			end if
		end tell
	else
		set albumCoverUrl to "https://i.imgur.com/qFmcbT0.png"
		set albumCoverPath to "/Users/hackettlai/Pictures/test/Spotify_cover.png"
		do shell script "curl " & quoted form of albumCoverUrl & " -o " & quoted form of albumCoverPath
		return " "
	end if
end tell

"/Users/hackettlai/Pictures/test/Spotify_cover.png" <-- this is my local folder
"https://i.imgur.com/qFmcbT0.png" this is my blank png to display as a backup

I’ve created a new preset to provide additional information aside to the notch for Spotify, including the album cover and song name.


** The middle section from the screen recording should be physically blocked by the notch.

Mini-Notch-250312.bttpreset (247.9 KB)

Okay, so I found that if I first create the folder Pictures/test then the appropriate track image shows in the folder. (I need to study the script more to find out what is causing it to be written there.) But anyway it still doesn't show in my menu:

I double checked all the script code and it's the same as yours (except for the username).

By the way, in this you can see the Like/Unlike button I added. It could also be placed in line with the other buttons, but I didn't feel like changing all the other button positions.

It’s quite strange that the cover image isn’t showing up on the menu. Could you please share your preset with me so I can test it out?

It’s quite strange that the cover image isn’t showing up on the menu. Could you please share your preset with me so I can test it out?

DZS Notchify.bttpreset (164.5 KB)

I’ve been testing it for a few days now, and it seems to be working perfectly for me!

Can you run curl --version in terminal to verify if you have curl installed properly?

Hey, perhaps you could try one more thing. Set the background image to your local “Spotify_cover.png” again to override my original setting. It may work.

1 Like

By the way here are the round corner images so you can replace the images for ": corner-left" and ": corner-right"

notch-corners.zip (1.1 KB)


Seem to be okay. Response is:

curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.63.0
Release-Date: 2024-03-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe UnixSockets```

That worked! Amazing!

Thanks so much.

1 Like

Sorry everyone, I have been working on my Masters the past year so really got distracted from working on Notchify.

I'm delighted to see that people have taken it and developed it though! Awesome work! I'll edit the original post and preset to match these developments. Apologies for abandoning the project for so long.

2 Likes

Welcome back! I'm looking forward to more features being added to the notch!!!

[Update]: Working with YouTube(Safari) Now!
Notchify-250617.bttpreset (148.2 KB)

  • Work with Spotify and YouTube(on Safari) running at the same time
  • For "Play/Pause," "Next Track," and "Previous Track," they should only control the currently playing media. If both YouTube and Spotify are playing simultaneously, both media will be affected at the same time.
  • For "album cover," "track title," "artist," and "track position," if both media are playing, no data will be displayed, except for a custom message and a blank cover image.

Notes:

Room for improvement:

  • You may need to initialize the script by playing something first. I've found that there's a small chance of encountering an error when there is nothing in the global variable. I hope there will be a fix or improvement for this in the future.
  • The YouTube cover image is in a 16:9 ratio, and I haven't figured out how to display it without stretching it to fit a 1:1 aspect ratio, which causes distortion. I'm looking for some advice on how to address this issue.

Hi, this gadget rules. Thanks to this thread I was able to get album artwork working. However, I've got an issue where a sliver of the art hangs over the bottom of the notch while the menu is closed. (I added the 1px border there to make it more obvious, still sticks out when border is disabled.)

You can't actually see the top rounded edge of the art like you see in the screenshot, that's hidden by the notch. But it sticks out to the bottom of the menu bar. I've worked around this by setting the "menu opacity when not hovered" to 0.03--less than that and it won't display. I haven't changed anything else outside of updating the directories in the script.

The corners are also kind of strange--both the top rounding icons work when the menu is visible, but as you can see, they're inconsistent when it's hidden. Top left and bottom right work, bottom left and top right do not. I've tried manually setting them to the linked above in this thread, no luck.

Also: is there a way to make the menu display only after hovering for a certain amount of time? It's easy to accidentally hit it when aiming for a tab right below it. The Hover Activation Delay only affects the time between initial hover and display. I'd like to specify a time before the hover activation will fire, to minimize accidental openings.

1 Like