- Start minimized to tray option added

This commit is contained in:
Trigg 2022-07-19 09:33:20 +00:00
parent 7c1d3b7d67
commit 1f6eb658c1
2 changed files with 9 additions and 5 deletions

View file

@ -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:

View file

@ -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: