Skip to content
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

Add resize_window configuration action #1245

Merged
merged 1 commit into from Dec 19, 2018

Conversation

eepp
Copy link
Contributor

@eepp eepp commented Dec 17, 2018

This patch adds the resize_window configuration action, which has the following arguments:

  1. Quality of resize amongst wider, narrower, taller, shorter (mandatory).
  2. Increment in number of cells (optional, default: 1).

This makes it possible to configure keys as such:

map ctrl+shift+left resize_window narrower
map ctrl+shift+right resize_window wider
map ctrl+shift+up resize_window taller
map ctrl+shift+down resize_window shorter

and have a behaviour which is somewhat close to Terminator's.

Should you accept this idea, I can add documentation in a subsequent patch.

@kovidgoyal
Copy link
Owner

is there some reason you dont like the existing facility for resizing?

@eepp
Copy link
Contributor Author

eepp commented Dec 17, 2018

is there some reason you dont like the existing facility for resizing?

Yes: I need to hit Ctrl+Shift+R, wait the 250+ ms this Python app takes to load, then use W/N/T/S, keys that are unrelated and scattered, then hit Escape.

Meanwhile I can just hit Ctrl+Shift+(Left/Right/Up/Down) in Terminator to quickly resize the current terminal instantaneously. And so can I in kitty with this patch now.

Is there another way I don't know?

@kovidgoyal
Copy link
Owner

Strange, is python particularly slow on you rmachine? On my four year old laptop, running this kitten takes less than 100ms which is perceptually almost instantaneous.

But OK, I'm fine with adding this action, please add a patch for the docs and ping me to review.

@eepp
Copy link
Contributor Author

eepp commented Dec 18, 2018

Where should I document this? Because on https://sw.kovidgoyal.net/kitty/conf.html, it looks like only actions with a default keyboard shortcut are documented. For example, neighboring_window and nth_window are not there, but they are mentioned on https://sw.kovidgoyal.net/kitty/.

@kovidgoyal
Copy link
Owner

The best place would be the layouts section in index.rst where it talks about resizing windows.

This patch adds the `resize_window` configuration action, which has the
following arguments:

1. Quality of resize amongst `wider`, `narrower`, `taller`, and
   `shorter` (mandatory).
2. Increment in number of cells (optional, default: 1).

This makes it possible to configure keys as such:

    map ctrl+shift+left resize_window narrower
    map ctrl+shift+right resize_window wider
    map ctrl+shift+up resize_window taller
    map ctrl+shift+down resize_window shorter

and have a behaviour which is somewhat close to Terminator's.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
@eepp
Copy link
Contributor Author

eepp commented Dec 19, 2018

Done.

@kovidgoyal kovidgoyal merged commit d22686d into kovidgoyal:master Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants