diff --git a/discover_overlay/discover_overlay.py b/discover_overlay/discover_overlay.py index 18f68a8..ffc365b 100755 --- a/discover_overlay/discover_overlay.py +++ b/discover_overlay/discover_overlay.py @@ -134,6 +134,8 @@ class Discover: print(" --undeaf ", _("Unset user deafened state")) print(" --moveto=XX ", _("Move the user into voice room, by Room ID")) + print(" --minimized ", + _("If tray icon is enabled, start with only tray icon and no configuration window")) print("") print(_("For gamescope compatibility ensure ENV has 'GDK_BACKEND=x11'")) if normal_close: @@ -437,7 +439,7 @@ class Discover: if self.mix_settings: MainSettingsWindow( - self.config_file, self.rpc_file, self.channel_file) + self.config_file, self.rpc_file, self.channel_file, []) def toggle_show(self, _obj=None): if self.voice_overlay: @@ -512,7 +514,7 @@ def entrypoint(): else: if "-c" in sys.argv or "--configure" in sys.argv: settings = MainSettingsWindow( - config_file, rpc_file, channel_file) + config_file, rpc_file, channel_file, sys.argv[1:]) Gtk.main() sys.exit(0) with open(rpc_file, "w") as tfile: diff --git a/discover_overlay/settings_window.py b/discover_overlay/settings_window.py index d164dec..62f0252 100644 --- a/discover_overlay/settings_window.py +++ b/discover_overlay/settings_window.py @@ -36,7 +36,8 @@ _ = t.gettext class MainSettingsWindow(): """Settings class""" - def __init__(self, config_file, rpc_file, channel_file): + def __init__(self, config_file, rpc_file, channel_file, args): + self.args = args self.steamos = False self.voice_placement_window = None self.text_placement_window = None @@ -133,8 +134,9 @@ class MainSettingsWindow(): self.populate_guild_menu() builder.connect_signals(self) - - window.show() + print(args) + if not ( self.show_sys_tray_icon and '--minimized' in self.args ): + window.show() def request_channels_from_guild(self, guild_id): with open(self.rpc_file, 'w') as f: