dotfiles/.config/kitty/my_shortcuts.conf

175 lines
4.8 KiB
Plaintext
Raw Permalink Normal View History

2024-01-29 10:11:00 +01:00
# vim:fileencoding=utf-8:foldmethod=marker:ft=kitty
# these shortcuts are here for just reference.
# TODO: update this shortcuts with actual kitty config
# and import this file directly
map f1 launch_tab ${EDITOR}
# masked by create new window but let's see
# map kitty_mod+c copy_to_clipboard
map kitty_mod+v paste_from_clipboard
map kitty_mod+k scroll_line_up
map kitty_mod+j scroll_line_down
map kitty_mod+u scroll_page_up
map kitty_mod+page_up scroll_page_up
map kitty_mod+d scroll_page_down
map kitty_mod+page_down scroll_page_down
map kitty_mod+home scroll_home
map kitty_mod+end scroll_end
map kitty_mod+z scroll_to_prompt -1
map kitty_mod+x scroll_to_prompt 1
map kitty_mod+h show_scrollback
map kitty_mod+g show_last_command_output
#: New window
map kitty_mod+c launch --cwd=current
## new window beside
map kitty_mod+b launch --location=neighbor
map kitty_mod+f launch --location=first
map kitty_mod+q close_window
map kitty_mod+w close_tab
map kitty_mod+. move_window_forward
map kitty_mod+, move_window_backward
map kitty_mod+shift+. move_tab_forward
map kitty_mod+shift+, move_tab_backward
#: Make window mAin window
map kitty_mod+a move_window_to_top
map kitty_mod+escape kitty_shell window
map kitty_mod+shift+u kitten unicode_input
map kitty_mod+m toggle_layout stack
map kitty_mod+e open_url_with_hints
#: Insert selected path
map kitty_mod+i>f kitten hints --type path --alphabet hjklfdsagtyrueiwoqpbnvmcxz1234567890 --program -
#: Insert selected line
map kitty_mod+i>l kitten hints --type line --program -
#: Insert selected word
map kitty_mod+i>w kitten hints --type word --program -
#: Open selected path
map kitty_mod+o>f kitten hints --type path
#:: Select something that looks like filename:linenum and open it in
#:: vim at the specified line number.
map kitty_mod+o>n kitten hints --type linenum
#:: Select a hyperlink (i.e. a URL that has been marked as such by
#:: the terminal program, for example, by `ls --hyperlink=auto`).
map kitty_mod+o>h kitten hints --type hyperlink
map kitty_mod+o>l kitten hints --type hyperlink
#: yank selected hash
map kitty_mod+y>h kitten hints --type hash --program @
#insert selected hash
map kitty_mod+i>h kitten hints --type hash --program -
map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j
map ctrl+k kitten pass_keys.py neighboring_window top ctrl+k
map ctrl+h kitten pass_keys.py neighboring_window left ctrl+h
map ctrl+l kitten pass_keys.py neighboring_window right ctrl+l
# the 3 here is the resize amount, adjust as needed
map kitty_mod+ctrl+j kitten pass_keys.py relative_resize down 3 alt+j
map kitty_mod+ctrl+k kitten pass_keys.py relative_resize up 3 alt+k
map kitty_mod+ctrl+h kitten pass_keys.py relative_resize left 3 alt+h
map kitty_mod+ctrl+l kitten pass_keys.py relative_resize right 3 alt+l
#switch to window
map kitty_mod+s focus_visible_window
map kitty_mod+ctrl+s swap_with_window
map kitty_mod+n next_tab
map kitty_mod+p previous_tab
map kitty_mod+t new_tab !neighbor
map kitty_mod+shift+t new_tab
# rename
map kitty_mod+r set_tab_title
map kitty_mod+space next_layout
map kitty_mod+shift+space last_used_layout
map kitty_mod+ctrl+space last_used_layout
map kitty_mod+tab goto_tab -1
map kitty_mod+1 goto_tab 1
map kitty_mod+2 goto_tab 2
map kitty_mod+3 goto_tab 3
map kitty_mod+4 goto_tab 4
map kitty_mod+5 goto_tab 5
map kitty_mod+6 goto_tab 6
map kitty_mod+7 goto_tab 7
map kitty_mod+8 goto_tab 8
map kitty_mod+9 goto_tab 9
# map kitty_mod+ctrl+q goto_tab 1
# map kitty_mod+ctrl+w goto_tab 2
# map kitty_mod+ctrl+e goto_tab 3
# map kitty_mod+ctrl+r goto_tab 4
# map kitty_mod+ctrl+t goto_tab 5
# map kitty_mod+ctrl+y goto_tab 6
# map kitty_mod+ctrl+u goto_tab 7
# map kitty_mod+ctrl+i goto_tab 8
# map kitty_mod+ctrl+o goto_tab 9
map kitty_mod+equal change_font_size all +0.5
map kitty_mod+plus change_font_size all +0.5
map kitty_mod+kp_add change_font_size all +0.5
# map cmd+plus change_font_size all +2.0
# map cmd+equal change_font_size all +2.0
# map shift+cmd+equal change_font_size all +2.0
#: Decrease font size
map kitty_mod+minus change_font_size all -0.5
map kitty_mod+kp_subtract change_font_size all -0.5
# map cmd+minus change_font_size all -2.0
# map shift+cmd+minus change_font_size all -2.0
#: Reset font size
map kitty_mod+backspace change_font_size all 0
map kitty_mod+0 change_font_size all 0
map kitty_mod+ctrl+i set_background_opacity +0.1
map kitty_mod+ctrl+d set_background_opacity -0.1
map kitty_mod+ctrl+f set_background_opacity 1
map kitty_mod+ctrl+r set_background_opacity default
map kitty_mod+delete clear_terminal reset active
map kitty_mod+backspace clear_terminal reset active
map kitty_mod+f5 load_config_file
#send ctrl+l with kitty mod
map kitty_mod+l send_text application \f