mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-03-13 01:26:37 -04:00
Add --minimized CLI option
This commit is contained in:
parent
5ad6562578
commit
3083626bda
@ -49,6 +49,9 @@ Your wallet works offline and requires no Internet connection.
|
||||
*--pw-stdin*::
|
||||
Read password of the database from stdin.
|
||||
|
||||
*--minimized*::
|
||||
Starts KeePassXC minimized to the system tray.
|
||||
|
||||
*--debug-info*::
|
||||
Displays debugging information.
|
||||
|
||||
|
@ -8819,6 +8819,10 @@ This option is deprecated, use --set-key-file instead.</source>
|
||||
<source>Passkey</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>start minimized to the system tray</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtIOCompressor</name>
|
||||
|
@ -86,6 +86,7 @@ int main(int argc, char** argv)
|
||||
QCommandLineOption pwstdinOption("pw-stdin", QObject::tr("read password of the database from stdin"));
|
||||
QCommandLineOption allowScreenCaptureOption("allow-screencapture",
|
||||
QObject::tr("allow screenshots and app recording (Windows/macOS)"));
|
||||
QCommandLineOption startMinimized("minimized", QObject::tr("start minimized to the system tray"));
|
||||
|
||||
QCommandLineOption helpOption = parser.addHelpOption();
|
||||
QCommandLineOption versionOption = parser.addVersionOption();
|
||||
@ -97,6 +98,7 @@ int main(int argc, char** argv)
|
||||
parser.addOption(pwstdinOption);
|
||||
parser.addOption(debugInfoOption);
|
||||
parser.addOption(allowScreenCaptureOption);
|
||||
parser.addOption(startMinimized);
|
||||
|
||||
parser.process(app);
|
||||
|
||||
@ -211,7 +213,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
// start minimized if configured
|
||||
if (config()->get(Config::GUI_MinimizeOnStartup).toBool()) {
|
||||
if (parser.isSet(startMinimized) || config()->get(Config::GUI_MinimizeOnStartup).toBool()) {
|
||||
mainWindow.hideWindow();
|
||||
} else {
|
||||
mainWindow.bringToFront();
|
||||
|
Loading…
x
Reference in New Issue
Block a user