diff --git a/GPClient/main.cpp b/GPClient/main.cpp index 0c91fc7..94e8a2b 100644 --- a/GPClient/main.cpp +++ b/GPClient/main.cpp @@ -45,6 +45,7 @@ int main(int argc, char *argv[]) parser.addOptions({ {"json", "Write the result of the handshake with the GlobalConnect server to stdout as JSON and terminate. Useful for scripting."}, {"now", "Do not show the dialog with the connect button; connect immediately instead."}, + {"start-minimized", "Launch the client minimized."}, }); parser.process(app); @@ -54,7 +55,7 @@ int main(int argc, char *argv[]) ? static_cast(new VpnJson(nullptr)) // Print to stdout and exit : static_cast(new VpnDbus(nullptr)); // Contact GPService daemon via dbus GPClient w(nullptr, vpn); - w.show(); + parser.isSet("start-minimized") ? w.showMinimized() : w.show(); if (positional.size() > 0) { w.portal(positional.at(0));