Closed cyfrost closed 5 years ago
@cyfrost What are the use cases for starting the app minimized? I'm assuming there are good use cases but I'm not familiar with what that might be.
@markypython, On Linux, my use-case is to have Gmail run at startup but minimized to the tray (to save it blasting open on my face on every boot). Other than that though, I can't think of anything else.
Thanks for this PR @cyfrost! As I find this feature quite useful as well, I'd like to have it configurable through the menu bar in Settings
too. Could you implement that as well please?
@timche, did you mean to have a "Auto start as minimized" option?
Correct. More like Start minimized
maybe?
Correct. More like
Start minimized
maybe?
@timche, I'm trying to understand: "Start minimized" can mean different things, for instance, when "Start minimized" is enabled and the user voluntarily opens Gmail from Launchpad / Dock or another app launcher in a different OS, it will start silently in the tray, And the another meaning could be that "Start Minimized" will actually auto-start Gmail at system startup minimized to the tray. Which of these did you mean?
You are right @cyfrost. Probably a better name could be Launch minimized
? It shouldn't auto-start on boot.
@timche, that has been added. We'll now have two ways to launch Gmail in minimized view. 1) append the --start-minimized
switch when running via CLI (like gmail --start-minimized
) and 2) Simply via the Settings > Launch Minimized
option. Thoughts?
This also helps if the user wants to make it open minimized to tray at auto-start on boot. They can simply enable Launch Minimized and then add Gmail to their Startup apps list via System Preferences and it should start minimized.
I've verified these working on Linux and Windows, can someone test this "Start Minimized" on macOS? Thanks!
Sorry for the slow progress on my side. First, thanks for implementing this, can't wait to have this feature in!
Would it be possible to have the argument called --launch-minimized
as well to have it aligned with how the setting is called?
Will test this on macOS.
Heh, no worries. I understand people have a life outside GitHub too ;)
I'm getting this error when I try to start it on macOS:
@timche My bad, sorry. The trayContextMenu.getMenuItemById
was supposed to handle the change between "Show" and "Hide" in the Tray icon of Gmail under Linux and Windows, but since a Tray instance won't be created for macOS, we now have a check for that.
@all-contributors please add @cyfrost for code, maintenance
@timche
I've put up a pull request to add @cyfrost! :tada:
--start-minimized
command line switch to decide if the app should start minimized.Verified these changes on Linux and Windows, someone else has to dirty test it on macOS.
Thoughts?