-
Notifications
You must be signed in to change notification settings - Fork 41
/
kitty.conf
290 lines (177 loc) · 9.13 KB
/
kitty.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# vim:fileencoding=utf-8:foldmethod=marker
# https://sw.kovidgoyal.net/kitty/conf/
# To get a full list of supported fonts use the `kitty +list-fonts` command.
font_family IosevkaTerm Nerd Font
#font_family JetBrainsMono Nerd Font
font_size 11.0
scrollback_lines 8000
paste_actions quote-urls-at-prompt
strip_trailing_spaces never
select_by_word_characters @-./_~?&=%+#
show_hyperlink_targets yes
remote_kitty if-needed
# https://sw.kovidgoyal.net/kitty/kittens/ssh/#opt-kitten-ssh.share_connections
share_connections yes
# unmap left click for open link (easy miss click)
mouse_map left click ungrabbed no-op
#: Click the link under the mouse or move the cursor
mouse_map ctrl+left click ungrabbed mouse_handle_click selection link prompt
mouse_map ctrl+left press ungrabbed mouse_selection normal
mouse_map right press ungrabbed copy_to_clipboard
remember_window_size yes
initial_window_width 640
initial_window_height 400
#: If enabled, the window size will be remembered so that new
#: instances of kitty will have the same size as the previous
#: instance. If disabled, the window will initially have size
#: configured by initial_window_width/height, in pixels. You can use a
#: suffix of "c" on the width/height values to have them interpreted
#: as number of cells instead of pixels.
# fat -- One (or optionally more) windows are shown full width on the top, the rest of the windows are shown side-by-side on the bottom
# grid -- All windows are shown in a grid
# horizontal -- All windows are shown side-by-side
# splits -- Windows arranged in arbitrary patterns created using horizontal and vertical splits
# stack -- Only a single maximized window is shown at a time
# tall -- One (or optionally more) windows are shown full height on the left, the rest of the windows are shown one below the other on the right
# vertical -- All windows are shown one below the other
enabled_layouts splits,stack
#enabled_layouts all
# Send a notification when a command takes more than 30 seconds in a invisible window
#notify_on_cmd_finish invisible 30.0
# https://sw.kovidgoyal.net/kitty/layouts/#the-splits-layout
include splits.conf
#: The enabled window layouts. A comma separated list of layout names.
#: The special value all means all layouts. The first listed layout
#: will be used as the startup layout. Default configuration is all
#: layouts in alphabetical order. For a list of available layouts, see
#: the https://sw.kovidgoyal.net/kitty/overview/#layouts.
window_resize_step_cells 2
window_resize_step_lines 2
#: The step size (in units of cell width/cell height) to use when
#: resizing kitty windows in a layout with the keyboard
#: (start_resizing_window). The cells value is used for horizontal
#: resizing and the lines value for vertical resizing.
window_border_width 0.5pt
visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
#: The list of characters to use for visual window selection (for
#: example for selecting a window to focus with focus_visible_window).
#: The value should be a series of unique numbers or alphabets, case
#: insensitive, from the set [0-9A-Z]. Specify your preference as a
#: string of characters.
# with Shell integration enabled, using negative values means windows sitting at a shell prompt are not counted,
# only windows where some command is currently running.
# see https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.confirm_os_window_close
confirm_os_window_close -1
tab_bar_style powerline
# emoji from https://emojipedia.org/regional-indicator-symbol-letter-z/
# title parse see https://github.com/kovidgoyal/kitty/blob/587f44ad4eb7fe545b0e580168cf0c32117b87c7/kitty/tab_bar.py#L175
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{index}:{'🇿' if layout_name == 'stack' and num_windows > 1 else ''}{title}"
#: The foreground and background colors
#background_opacity 0.95
background_opacity 1.0
background_image none
#: Path to a background image. Must be in PNG format.
background_image_layout tiled
#: Whether to tile, scale or clamp the background image. The value can
#: be one of tiled, mirror-tiled, scaled, clamped.
background_image_linear no
#: When background image is scaled, whether linear interpolation
#: should be used.
dynamic_background_opacity yes
#: Allow changing of the background_opacity dynamically, using either
#: keyboard shortcuts (increase_background_opacity and
#: decrease_background_opacity) or the remote control facility.
#: Changing this setting by reloading the config is not supported.
allow_remote_control yes
#: Allow other programs to control kitty. If you turn this on other
#: programs can control all aspects of kitty, including sending text
#: to kitty windows, opening new windows, closing windows, reading the
#: content of windows, etc. Note that this even works over ssh
#: connections. You can chose to either allow any program running
#: within kitty to control it, with yes or only programs that connect
#: to the socket specified with the kitty --listen-on command line
#: option, if you use the value socket-only. The latter is useful if
#: you want to prevent programs running on a remote computer over ssh
#: from controlling kitty. Reloading the config will not affect this
#: setting.
#listen_on unix:$XDG_RUNTIME_DIR/kitty.sock
#listen_on tcp:localhost:12488
#: Tell kitty to listen to the specified unix/tcp socket for remote
#: control connections. Note that this will apply to all kitty
#: instances. It can be overridden by the kitty --listen-on command
#: line flag. This option accepts only UNIX sockets, such as
#: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment
#: variables are expanded. If {kitty_pid} is present then it is
#: replaced by the PID of the kitty process, otherwise the PID of the
#: kitty process is appended to the value, with a hyphen. This option
#: is ignored unless you also set allow_remote_control to enable
#: remote control. See the help for kitty --listen-on for more
#: details. Changing this option by reloading the config is not
#: supported.
#startup_session none
startup_session session.conf
allow_hyperlinks yes
#: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8
#: escape sequences are ignored. Otherwise they become clickable
#: links, that you can click by with the mouse or the hints kitten
#: </kittens/hints>. The special value of ``ask`` means that kitty
#: will ask before opening the link when clicked.
shell_integration enabled
#: Enable shell integration on supported shells. This enables features
#: such as jumping to previous prompts, browsing the output of the
#: previous command in a pager, etc. on supported shells. Set to
#: ``disabled`` to turn off shell integration, completely. See
#: https://sw.kovidgoyal.net/kitty/shell-integration/ for details.
#term xterm-kitty
term xterm-256color
kitty_mod ctrl+shift
# kitty_mod has to be modifiers not keys, see
# https://github.com/kovidgoyal/kitty/discussions/3457#discussioncomment-587511
# so you can NOT do this:
#kitty_mod ctrl+a
#map kitty_mod+enter new_window
# disable this as can lead to window created by accident via press by ctrl+shift+v paste command and then press enter
map kitty_mod+enter no-op
map cmd+enter no-op
map ctrl+a>x close_window
map ctrl+a>] next_window
map ctrl+a>[ previous_window
map ctrl+a>period move_window_forward
map ctrl+a>comma move_window_backward
#map kitty_mod+t new_tab_with_cwd
# map kitty_mod+t new_tab
map kitty_mod+t launch --location=hsplit
# new_tab will not keep cwd, use `new_tab_with_cwd` instead or `launch --cwd=current --type=tab`
# see https://sw.kovidgoyal.net/kitty/faq/#how-do-i-open-a-new-window-or-tab-with-the-same-working-directory-as-the-current-window
# tmux like tab create via `--cwd=last_reported`, warning: this need kitty `shell_integration enabled`
map ctrl+a>c launch --cwd=last_reported --type=tab
map ctrl+a>, set_tab_title
#: Increase font size
map ctrl+equal change_font_size all +2.0
map ctrl+plus change_font_size all +2.0
map ctrl+kp_add change_font_size all +2.0
#: Decrease font size
map ctrl+minus change_font_size all -2.0
map ctrl+kp_subtract change_font_size all -2.0
#: Reset font size
map ctrl+0 change_font_size all 0
map f11 toggle_fullscreen
# map ctrl+a>e edit_config_file
map ctrl+a>e no-op
map ctrl+a>shift+e launch --type=tab nvim ~/.config/kitty/kitty.conf
#: Reload kitty.conf
map ctrl+a>shift+r combine : load_config_file : launch --type=overlay sh -c 'echo "kitty config reloaded."; echo; read -r -p "Press Enter to exit"; echo ""'
#: Debug kitty configuration
map ctrl+a>shift+d debug_config
# BEGIN_KITTY_THEME
# Dark One Nuanced
include current-theme.conf
# END_KITTY_THEME
# default alphabet see https://github.com/kovidgoyal/kitty/blob/0c4b20aa4e6b29ccf7c389e15d7ff5189f8e98f5/kittens/hints/main.py#L125
# qwerty alphabets borrow from https://github.com/fcsonline/tmux-thumbs#Alphabets
map ctrl+a>space kitten hints --alphabet asdfqwerzxcvjklmiuopghtybn1234567890 --customize-processing custom-hints.py
map f3 kitten hints --program '*'
# https://github.com/console-rs/console/pull/85/files
# https://github.com/console-rs/console/pull/84
# map double ctrl+a to ctrl+a (home)
map ctrl+a>ctrl+a send_text all \x01