"Close to tray" setting
Victor239 opened this issue · 1 comments
Checklist
- I understand that Streamlink Twitch GUI is just a launcher for Streamlink
- I have read the contribution guidelines
- I have checked the list of open and recently closed issues
- I have checked the commit log of the master branch
Description
It would be very helpful to be able to click the "close" button on the main window and have the app stay in the background in the system tray. I know that right now you can minimise to tray, but I've got muscle memory from my many other apps which have close to tray functionality so I'd like if it was possible with Streamlink too. Thanks!
This has been requested a few times in the past. I've rejected all of these requests so far, but decided to implement this now. Be aware though that there are a couple of limitations.
Changes are on the feature/close-to-tray
branch. Going to merge this tomorrow (in the afternoon today actually) unless I'm finding any issues.
https://github.com/streamlink/streamlink-twitch-gui/compare/feature/close-to-tray
One of the limitations is that "closing to tray" will only work when closing the application window, via the close button or other means. I can't let the application listen to SIGINT
or SIGTERM
signals and then move the window to the tray area. This is irrelevant on Windows though.
The second commit on that branch resolves an issue when "external commands" or advanced settings are turned off. The application window should now always re-appear from tray when trying to launch the GUI multiple times. However, this seems to be broken on Windows and macOS. On Windows, this does only work for the first time and any further launch attempts are not recognized. On macOS, it doesn't work at all. I can't fix this, because it's an NW.js issue. It's working fine on Linux though.
So if you're now hiding instead of closing the window (aka. "closing" to tray) and you have the app launcher/executable pinned to your task bar or dock, then you might not be able to make it re-appear by trying to launch the GUI again. You'll have to click the tray icon.