macdems / yet-another-spotify-tray

Tray icon for Spotify Linux client application
MIT License
22 stars 6 forks source link

Option for minimizing on start #3

Closed sccoouut closed 2 years ago

sccoouut commented 2 years ago

Hey, first of all thanks for your great app, because it's really amazing. Could you please add option for minimizing on start, because when we want to start a Spotify client from a apps menu, for example, we don't really want it to be minimized. So could you please add option for that, something like "-m" or "--minimized" would be great. I have tried to do that by myself, but I haven't found where the app is being minimized on its boot. Thanks in advance.

sccoouut commented 2 years ago

Update: I have done the feature that I described in this issue, but I believe that I haven't done it in the best way it can be done, because I have never worked with Qt Framework, so I haven't opened a PR. There's is my solution (very bad). If you want I can open a PR, or if you can find a better way to implement it, it would be very nice. Again, thanks in advance.

taffarel55 commented 2 years ago

I had this need and what I did was add a script to start when the computer turns on. This script kills spotify (for some reason I couldn't remove it from startup :smile: ), starts it again, after a sleep starts the spotify-tray. I can share it here, I just don't do it now because I did it on my personal computer and it's dead now.

macdems commented 2 years ago

Thank you for your comments. I prefer to keep the minimized startup a default, so I have added a --show-window command line option. It must be specified as the first argument as all the others are passed to Spotify.

Also in your script you does not have to kill Spotify. spotify-tray will capture existing Spotify window instead of starting a new instance.