Skip to content

Add resize_window configuration action#1245

Merged
kovidgoyal merged 1 commit intokovidgoyal:masterfrom
eepp:resize-window-cfg
Dec 19, 2018
Merged

Add resize_window configuration action#1245
kovidgoyal merged 1 commit intokovidgoyal:masterfrom
eepp:resize-window-cfg

Conversation

@eepp
Copy link
Copy Markdown
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
Copy Markdown
Owner

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

@eepp
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 eepp force-pushed the resize-window-cfg branch from 6d10131 to d22686d Compare December 19, 2018 01:33
@eepp
Copy link
Copy Markdown
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.

2 participants