ungive / discord-music-presence

The Discord music status that works with any media player
https://musicpresence.app
Other
194 stars 2 forks source link

Hide application while running/minimise to tray #32

Closed bashout closed 2 months ago

bashout commented 2 months ago

Is there an existing issue for this?

Describe the problem

OS: MacOS

When using music presence on MacOS the application persists within the app dock. I detest leaving applications open and present there. It would be nice to be able to minimise/enable the app to live in the background more akin to a service than an application than maintains an open state.

image

Bonus points for giving us a non-colored/minimal version of the icon

image

Solution

The ability to prevent the app persisting in the app dock, while still reporting rich presence.

ungive commented 2 months ago

Thanks for reaching out! Glad to see there's a user base on Mac (statistics show only a handful of users).

I've looked into this before and you could actually do this right now by modifying the plist file in the "Music Presence.app" directory. I can't try it right now, but these links show up as visited in my browser when I google for it again:

I'll definitely look into this again when I work on improving the Mac app, I'm currently working on automatic updates for Windows (will release in 2.2.0). Once that is done I will pay attention to automatic updates on mac, autostart on mac and hiding the tray icon. An icon redesign is also planned but I'm really not the best designer, so that might take a bit.

I hope the links I sent help you resolve the issue for now.

bashout commented 2 months ago

Nice, I'm fairly new to macOS, so getting used to the weird window management it uses. Happy to give those links a look tomorrow or when I get the chance.

Awesome you got back to me so fast!

bashout commented 2 months ago

Happy to report executing /usr/libexec/PlistBuddy -c "Add :LSUIElement bool true" "/Applications/Music Presence.app/Contents/Info.plist" works for allowing it to run as an agent. Feel free to close for now if you have something already tracking the improvments you want to make

ungive commented 2 months ago

I've added that key to the Info.plist of the app for now, although I don't think an agent should create windows because when it does, no icon is shown in the dock, which is probably against some design guideline. In the future I will probably need to revisit this, but for now adding this was trivial.

The next update (version 2.2.0) will start Music Presence as an agent without a dock icon.

ungive commented 1 month ago

The next version of Music Presence will have a monochrome tray icon, see #36