Skip to content

Add launch command "--start-as" option #6026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marcoSven opened this issue Feb 15, 2023 · 4 comments
Closed

Add launch command "--start-as" option #6026

marcoSven opened this issue Feb 15, 2023 · 4 comments

Comments

@marcoSven
Copy link

Is your feature request related to a problem? Please describe.
See issue #6021

Describe the solution you'd like
Add --start-as to the launch command option to control how the initial kitty window is created.
Default: normal
Choices: fullscreen, maximized, minimized, normal

example to launch with a maximized window.
launch --type=os-window --start-as=maximized

The --start-as option is already available in the CLI https://sw.kovidgoyal.net/kitty/invocation/#cmdoption-kitty-start-as

@kovidgoyal
Copy link
Owner

As I said in the previous issue, this is not something thats worth the
effort to me, but patches are welcome.

@page-down
Copy link
Contributor

page-down commented Feb 16, 2023

@kovidgoyal
How do I set the value for wndconfig->maximized?
If we can get the following code to work when the window is created, the window will be displayed in the maximized state. So the maximizing animation will not appear.

glfw/cocoa_window.m

if (wndconfig->maximized)
    [window->ns.object zoom:nil];

glfw/wl_window.c

if (wndconfig->maximized)
    window->wl.maximize_on_first_show = true;

I believe that the function glfwCreateWindow needs extra parameters for this purpose.

Related issue:
#4949

@kovidgoyal
Copy link
Owner

kovidgoyal commented Feb 16, 2023 via email

@marcoSven
Copy link
Author

🙏 Thank you @kovidgoyal - I was planning to look into it this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants