From 394e7a53cb00b11e8fa8541026c1bea396d27688 Mon Sep 17 00:00:00 2001 From: Michel Date: Tue, 13 Jun 2023 17:27:51 +0200 Subject: [PATCH] feat(kitty): kitten _grab --- .config/kitty/grab.conf | 55 ++++++++++++++++++++++++++++++++++++++++ .config/kitty/kitty.conf | 3 +++ 2 files changed, 58 insertions(+) create mode 100644 .config/kitty/grab.conf diff --git a/.config/kitty/grab.conf b/.config/kitty/grab.conf new file mode 100644 index 0000000..d56ec48 --- /dev/null +++ b/.config/kitty/grab.conf @@ -0,0 +1,55 @@ +# vim:fileencoding=utf-8:ft=conf:foldmethod=marker + +#: Colors {{{ + +# selection_foreground #FFFFFF +# selection_background #5294E2 + +#: Colors for selected text while grabbing. + +#: }}} + +#: Key shortcuts {{{ + +# map q quit + +#: Exit the grabber without copying anything. + +# map Enter confirm +map y confirm + +#: Copy the selected region to clipboard and exit. + +map h move left +map l move right +map k move up +map j move down +map Ctrl+b move page up +map Ctrl+f move page down +map 0 move first +map _ move first nonwhite +map $ move last nonwhite +map g move top +map G move bottom +map b move word left +map w move word right + +#: Move the cursor around the screen. +#: This will scroll the buffer if needed and possible. +#: Note that due to https://github.com/kovidgoyal/kitty/issues/5469, the ctrl+d +#: shortcut will only work with kitty >= 0.26.2 + +map Ctrl+y scroll up +map Ctrl+e scroll down + +#: Scroll the buffer, if possible. +#: Cursor stays in the same position relative to the screen. + +map v set_mode visual +map Ctrl+v set_mode block +map Ctrl+Left_Bracket set_mode normal +map Escape set_mode normal + +#: Change the selecting mode. + +#: }}} diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 058ad0b..f457dbf 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -125,6 +125,9 @@ dynamic_background_opacity yes kitten_alias hints hints --alphabet="_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" +# kitty_grab +# https://github.com/yurikhan/kitty_grab +map kitty_mod+PRINT_SCREEN kitten kitty_grab/grab.py #: Keyboard shortcuts #