mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-24 01:18:53 -04:00
Add flag to start application minimized to tray
This commit is contained in:
1 parent
58aba0a147
commit
15ace9d094
2 files changed
+27
-8
No files matched your search
@@ -26,9 +26,10 @@ static std::string profile_save_filename = "";
|
||||
|
||||
enum
|
||||
{
|
||||
RET_FLAG_PRINT_HELP = 1,
|
||||
RET_FLAG_START_GUI = 2,
|
||||
RET_FLAG_I2C_TOOLS = 4,
|
||||
RET_FLAG_PRINT_HELP = 1,
|
||||
RET_FLAG_START_GUI = 2,
|
||||
RET_FLAG_I2C_TOOLS = 4,
|
||||
RET_FLAG_START_MINIMIZED = 8,
|
||||
};
|
||||
|
||||
struct DeviceOptions
|
||||
@@ -348,9 +349,10 @@ void OptionHelp()
|
||||
help_text += "Usage: OpenRGB (--device [--mode] [--color])...\n";
|
||||
help_text += "\n";
|
||||
help_text += "Options:\n";
|
||||
help_text += "--gui Shows the GUI. GUI also appears when not passing any parameters\n";
|
||||
help_text += "--startminimized Starts the GUI minimized to tray. Implies --gui, even if not specified\n";
|
||||
help_text += "--server Starts the SDK's server\n";
|
||||
help_text += "--server-port Sets the SDK's server port. Default: 6742 (1024-65535)\n";
|
||||
help_text += "--gui Shows the GUI, also appears when not passing any parameters\n";
|
||||
help_text += "-l, --list-devices Lists every compatible device with their number\n";
|
||||
help_text += "-d, --device [0-9] Selects device to apply colors and/or effect to, or applies to all devices if omitted\n";
|
||||
help_text += " Can be specified multiple times with different modes and colors\n";
|
||||
@@ -723,6 +725,14 @@ int ProcessOptions(int argc, char *argv[], Options *options)
|
||||
ret_flags |= RET_FLAG_I2C_TOOLS;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| --startminimized |
|
||||
\*---------------------------------------------------------*/
|
||||
else if(option == "--startminimized")
|
||||
{
|
||||
ret_flags |= RET_FLAG_START_GUI | RET_FLAG_START_MINIMIZED;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| -h / --help (no arguments) |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
Reference in new issue
Block a user