File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ def systray_icon_clicked(reason: QSystemTrayIcon.ActivationReason):
6969 help = 'toggles Yin-Yang' ,
7070 action = 'store_true' )
7171parser .add_argument ('--systemd' , help = 'uses systemd journal handler and applies desired theme' , action = 'store_true' )
72+ parser .add_argument ('--minimized' , help = 'starts the program to tray bar' , action = 'store_true' )
7273arguments = parser .parse_args ()
7374setup_logger (arguments .systemd )
7475
@@ -81,6 +82,7 @@ def systray_icon_clicked(reason: QSystemTrayIcon.ActivationReason):
8182elif arguments .systemd :
8283 theme_switcher .set_desired_theme ()
8384
85+
8486else :
8587 # load GUI
8688 config .add_event_listener (ConfigEvent .SAVE , daemon_handler .watcher )
@@ -138,6 +140,9 @@ def systray_icon_clicked(reason: QSystemTrayIcon.ActivationReason):
138140 else :
139141 logger .debug ('System tray is unsupported' )
140142
141- window = main_window_connector .MainWindow ()
142- window .show ()
143- sys .exit (app .exec ())
143+ if arguments .minimized :
144+ sys .exit (app .exec ())
145+ else :
146+ window = main_window_connector .MainWindow ()
147+ window .show ()
148+ sys .exit (app .exec ())
You can’t perform that action at this time.
0 commit comments