mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Have the --start-as flag be respected when used with --single-instance
Fixes #9228
This commit is contained in:
@@ -165,6 +165,9 @@ Detailed list of changes
|
|||||||
|
|
||||||
- kitten @ ls: Also output the neighbors for every window (:disc:`9225`)
|
- kitten @ ls: Also output the neighbors for every window (:disc:`9225`)
|
||||||
|
|
||||||
|
- Have the :option:`kitty --start-as` flag be respected when used with
|
||||||
|
:option:`kitty --single-instance` (:iss:`9228`)
|
||||||
|
|
||||||
|
|
||||||
0.44.0 [2025-11-03]
|
0.44.0 [2025-11-03]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -941,9 +941,10 @@ class Boss:
|
|||||||
assert isinstance(window.launch_spec, LaunchSpec)
|
assert isinstance(window.launch_spec, LaunchSpec)
|
||||||
launch(get_boss(), window.launch_spec.opts, window.launch_spec.args)
|
launch(get_boss(), window.launch_spec.opts, window.launch_spec.args)
|
||||||
continue
|
continue
|
||||||
|
wstate = args.start_as if args.start_as and args.start_as != 'normal' else None
|
||||||
os_window_id = self.add_os_window(
|
os_window_id = self.add_os_window(
|
||||||
session, wclass=args.cls, wname=args.name, opts_for_size=opts, startup_id=startup_id,
|
session, wclass=args.cls, wname=args.name, opts_for_size=opts, startup_id=startup_id,
|
||||||
override_title=args.title or None)
|
override_title=args.title or None, window_state=wstate)
|
||||||
if session.focus_os_window:
|
if session.focus_os_window:
|
||||||
focused_os_window = os_window_id
|
focused_os_window = os_window_id
|
||||||
if opts.background_opacity != get_options().background_opacity:
|
if opts.background_opacity != get_options().background_opacity:
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ system-wide defaults for all users. You can use either :code:`-` or
|
|||||||
|
|
||||||
def kitty_options_spec() -> str:
|
def kitty_options_spec() -> str:
|
||||||
if not hasattr(kitty_options_spec, 'ans'):
|
if not hasattr(kitty_options_spec, 'ans'):
|
||||||
OPTIONS = '''
|
OPTIONS = """
|
||||||
--class --app-id
|
--class --app-id
|
||||||
dest=cls
|
dest=cls
|
||||||
default={appname}
|
default={appname}
|
||||||
@@ -484,7 +484,10 @@ without an actual window, use :option:`{appname} --start-as`=hidden.
|
|||||||
type=choices
|
type=choices
|
||||||
default=normal
|
default=normal
|
||||||
choices=normal,fullscreen,maximized,minimized,hidden
|
choices=normal,fullscreen,maximized,minimized,hidden
|
||||||
Control how the initial kitty window is created.
|
Control how the initial kitty OS window is created. Note that
|
||||||
|
this is applies to all OS Windows if you use the :option:`{appname} --session`
|
||||||
|
option to create multiple OS Windows. Any OS Windows state in
|
||||||
|
specified in the session file gets overriden.
|
||||||
|
|
||||||
|
|
||||||
--position
|
--position
|
||||||
@@ -552,7 +555,7 @@ This option is deprecated in favor of the :opt:`watcher` option in
|
|||||||
--execute -e
|
--execute -e
|
||||||
type=bool-set
|
type=bool-set
|
||||||
!
|
!
|
||||||
'''
|
"""
|
||||||
setattr(kitty_options_spec, 'ans', OPTIONS.format(
|
setattr(kitty_options_spec, 'ans', OPTIONS.format(
|
||||||
appname=appname, conf_name=appname, listen_on_defn=listen_on_defn,
|
appname=appname, conf_name=appname, listen_on_defn=listen_on_defn,
|
||||||
grab_keyboard_docs=grab_keyboard_docs, wait_for_single_instance_defn=wait_for_single_instance_defn,
|
grab_keyboard_docs=grab_keyboard_docs, wait_for_single_instance_defn=wait_for_single_instance_defn,
|
||||||
|
|||||||
Reference in New Issue
Block a user