]> git.rmz.io Git - dotfiles.git/blob - zellij/config.kdl
zellij: initial setup
[dotfiles.git] / zellij / config.kdl
1 keybinds {
2 normal {
3 // uncomment this and adjust key if using copy_on_select=false
4 // bind "Alt c" { Copy; }
5 }
6 locked {
7 bind "Ctrl g" { SwitchToMode "Normal"; }
8 }
9 resize {
10 bind "Ctrl n" { SwitchToMode "Normal"; }
11 bind "h" "Left" { Resize "Increase Left"; }
12 bind "j" "Down" { Resize "Increase Down"; }
13 bind "k" "Up" { Resize "Increase Up"; }
14 bind "l" "Right" { Resize "Increase Right"; }
15 bind "H" { Resize "Decrease Left"; }
16 bind "J" { Resize "Decrease Down"; }
17 bind "K" { Resize "Decrease Up"; }
18 bind "L" { Resize "Decrease Right"; }
19 bind "=" "+" { Resize "Increase"; }
20 bind "-" { Resize "Decrease"; }
21 }
22 pane {
23 bind "Ctrl p" { SwitchToMode "Normal"; }
24 bind "h" "Left" { MoveFocus "Left"; }
25 bind "l" "Right" { MoveFocus "Right"; }
26 bind "j" "Down" { MoveFocus "Down"; }
27 bind "k" "Up" { MoveFocus "Up"; }
28 bind "p" { SwitchFocus; }
29 bind "n" { NewPane; SwitchToMode "Normal"; }
30 bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
31 bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
32 bind "x" { CloseFocus; SwitchToMode "Normal"; }
33 bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
34 bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
35 bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
36 bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
37 bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
38 bind "i" { TogglePanePinned; SwitchToMode "Normal"; }
39 }
40 move {
41 bind "Ctrl h" { SwitchToMode "Normal"; }
42 bind "n" "Tab" { MovePane; }
43 bind "p" { MovePaneBackwards; }
44 bind "h" "Left" { MovePane "Left"; }
45 bind "j" "Down" { MovePane "Down"; }
46 bind "k" "Up" { MovePane "Up"; }
47 bind "l" "Right" { MovePane "Right"; }
48 }
49 tab {
50 bind "Ctrl t" { SwitchToMode "Normal"; }
51 bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
52 bind "h" "Left" "Up" "k" { GoToPreviousTab; }
53 bind "l" "Right" "Down" "j" { GoToNextTab; }
54 bind "n" { NewTab; SwitchToMode "Normal"; }
55 bind "x" { CloseTab; SwitchToMode "Normal"; }
56 bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
57 bind "b" { BreakPane; SwitchToMode "Normal"; }
58 bind "]" { BreakPaneRight; SwitchToMode "Normal"; }
59 bind "[" { BreakPaneLeft; SwitchToMode "Normal"; }
60 bind "1" { GoToTab 1; SwitchToMode "Normal"; }
61 bind "2" { GoToTab 2; SwitchToMode "Normal"; }
62 bind "3" { GoToTab 3; SwitchToMode "Normal"; }
63 bind "4" { GoToTab 4; SwitchToMode "Normal"; }
64 bind "5" { GoToTab 5; SwitchToMode "Normal"; }
65 bind "6" { GoToTab 6; SwitchToMode "Normal"; }
66 bind "7" { GoToTab 7; SwitchToMode "Normal"; }
67 bind "8" { GoToTab 8; SwitchToMode "Normal"; }
68 bind "9" { GoToTab 9; SwitchToMode "Normal"; }
69 bind "Tab" { ToggleTab; }
70 }
71 scroll {
72 bind "Ctrl s" { SwitchToMode "Normal"; }
73 bind "e" { EditScrollback; SwitchToMode "Normal"; }
74 bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
75 bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
76 bind "j" "Down" { ScrollDown; }
77 bind "k" "Up" { ScrollUp; }
78 bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
79 bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
80 bind "d" { HalfPageScrollDown; }
81 bind "u" { HalfPageScrollUp; }
82 // uncomment this and adjust key if using copy_on_select=false
83 // bind "Alt c" { Copy; }
84 }
85 search {
86 bind "Ctrl s" { SwitchToMode "Normal"; }
87 bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
88 bind "j" "Down" { ScrollDown; }
89 bind "k" "Up" { ScrollUp; }
90 bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
91 bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
92 bind "d" { HalfPageScrollDown; }
93 bind "u" { HalfPageScrollUp; }
94 bind "n" { Search "down"; }
95 bind "p" { Search "up"; }
96 bind "c" { SearchToggleOption "CaseSensitivity"; }
97 bind "w" { SearchToggleOption "Wrap"; }
98 bind "o" { SearchToggleOption "WholeWord"; }
99 }
100 entersearch {
101 bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
102 bind "Enter" { SwitchToMode "Search"; }
103 }
104 renametab {
105 bind "Ctrl c" { SwitchToMode "Normal"; }
106 bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
107 }
108 renamepane {
109 bind "Ctrl c" { SwitchToMode "Normal"; }
110 bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
111 }
112 session {
113 bind "Ctrl o" { SwitchToMode "Normal"; }
114 bind "Ctrl s" { SwitchToMode "Scroll"; }
115 bind "d" { Detach; }
116 bind "w" {
117 LaunchOrFocusPlugin "session-manager" {
118 floating true
119 move_to_focused_tab true
120 };
121 SwitchToMode "Normal"
122 }
123 bind "c" {
124 LaunchOrFocusPlugin "configuration" {
125 floating true
126 move_to_focused_tab true
127 };
128 SwitchToMode "Normal"
129 }
130 bind "p" {
131 LaunchOrFocusPlugin "plugin-manager" {
132 floating true
133 move_to_focused_tab true
134 };
135 SwitchToMode "Normal"
136 }
137 bind "a" {
138 LaunchOrFocusPlugin "zellij:about" {
139 floating true
140 move_to_focused_tab true
141 };
142 SwitchToMode "Normal"
143 }
144 }
145 tmux {
146 bind "Ctrl b" { Write 2; SwitchToMode "locked"; }
147
148 bind "Ctrl l" { GoToNextTab; SwitchToMode "locked"; }
149 bind "Ctrl h" { GoToPreviousTab; SwitchToMode "locked"; }
150
151 bind "[" { SwitchToMode "Scroll"; }
152
153 bind "-" { NewPane "Down"; SwitchToMode "locked"; }
154 bind "|" { NewPane "Right"; SwitchToMode "locked"; }
155
156 bind "z" { ToggleFocusFullscreen; SwitchToMode "locked"; }
157
158 bind "c" { NewTab; SwitchToMode "locked"; }
159 bind "," { SwitchToMode "RenameTab"; }
160 bind "p" { GoToPreviousTab; SwitchToMode "locked"; }
161 bind "n" { GoToNextTab; SwitchToMode "locked"; }
162 bind "Left" { MoveFocus "Left"; SwitchToMode "locked"; }
163 bind "Right" { MoveFocus "Right"; SwitchToMode "locked"; }
164 bind "Down" { MoveFocus "Down"; SwitchToMode "locked"; }
165 bind "Up" { MoveFocus "Up"; SwitchToMode "locked"; }
166 bind "h" { MoveFocus "Left"; SwitchToMode "locked"; }
167 bind "l" { MoveFocus "Right"; SwitchToMode "locked"; }
168 bind "j" { MoveFocus "Down"; SwitchToMode "locked"; }
169 bind "k" { MoveFocus "Up"; SwitchToMode "locked"; }
170 bind "o" { FocusNextPane; }
171 bind "d" { Detach; }
172 bind "Space" { NextSwapLayout; }
173 bind "x" { CloseFocus; SwitchToMode "locked"; }
174 }
175 shared_except "locked" {
176 bind "Ctrl g" { SwitchToMode "Locked"; }
177 bind "Alt g" { Write 7; }
178 bind "Ctrl q" { Quit; }
179 bind "Alt f" { ToggleFloatingPanes; }
180 bind "Alt n" { NewPane; }
181 bind "Alt i" { MoveTab "Left"; }
182 bind "Alt o" { MoveTab "Right"; }
183 bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
184 bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
185 bind "Alt j" "Alt Down" { MoveFocus "Down"; }
186 bind "Alt k" "Alt Up" { MoveFocus "Up"; }
187 bind "Alt =" "Alt +" { Resize "Increase"; }
188 bind "Alt -" { Resize "Decrease"; }
189 bind "Alt [" { PreviousSwapLayout; }
190 bind "Alt ]" { NextSwapLayout; }
191 }
192 shared_except "normal" "locked" {
193 bind "Enter" "Esc" { SwitchToMode "locked"; }
194 }
195 shared_except "pane" "locked" {
196 bind "Ctrl p" { SwitchToMode "Pane"; }
197 }
198 shared_except "resize" "locked" {
199 bind "Ctrl n" { SwitchToMode "Resize"; }
200 }
201 shared_except "scroll" "locked" {
202 bind "Ctrl s" { SwitchToMode "Scroll"; }
203 }
204 shared_except "session" "locked" {
205 bind "Ctrl o" { SwitchToMode "Session"; }
206 }
207 shared_except "tab" "locked" {
208 bind "Ctrl t" { SwitchToMode "Tab"; }
209 }
210 shared_except "move" "locked" {
211 bind "Ctrl h" { SwitchToMode "Move"; }
212 }
213 shared_except "tmux" {
214 bind "Ctrl b" { SwitchToMode "Tmux"; }
215 }
216 }
217
218 // Plugin aliases - can be used to change the implementation of Zellij
219 // changing these requires a restart to take effect
220 plugins {
221 tab-bar location="zellij:tab-bar"
222 status-bar location="zellij:status-bar"
223 strider location="zellij:strider"
224 compact-bar location="zellij:compact-bar"
225 session-manager location="zellij:session-manager"
226 welcome-screen location="zellij:session-manager" {
227 welcome_screen true
228 }
229 filepicker location="zellij:strider" {
230 cwd "/"
231 }
232 configuration location="zellij:configuration"
233 plugin-manager location="zellij:plugin-manager"
234 about location="zellij:about"
235 }
236
237 // Plugins to load in the background when a new session starts
238 load_plugins {
239 // "file:/path/to/my-plugin.wasm"
240 // "https://example.com/my-plugin.wasm"
241 }
242
243 // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
244 // eg. when terminal window with an active zellij session is closed
245 // (Requires restart)
246 // Options:
247 // - detach (Default)
248 // - quit
249 //
250 // on_force_close "quit"
251
252 // Send a request for a simplified ui (without arrow fonts) to plugins
253 // Options:
254 // - true
255 // - false (Default)
256 //
257 // simplified_ui true
258
259 // Choose the path to the default shell that zellij will use for opening new panes
260 // Default: $SHELL
261 //
262 // default_shell "fish"
263
264 // Choose the path to override cwd that zellij will use for opening new panes
265 //
266 // default_cwd ""
267
268 // Toggle between having pane frames around the panes
269 // Options:
270 // - true (default)
271 // - false
272 //
273 pane_frames false
274
275 // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
276 // Options:
277 // - true (default)
278 // - false
279 //
280 // auto_layout true
281
282 // Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
283 // (Requires restart)
284 // Options:
285 // - true (default)
286 // - false
287 //
288 session_serialization false
289
290 // Whether pane viewports are serialized along with the session, default is false
291 // (Requires restart)
292 // Options:
293 // - true
294 // - false (default)
295 //
296 // serialize_pane_viewport true
297
298 // Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
299 // defaults to the scrollback size. If this number is higher than the scrollback size, it will
300 // also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
301 // (Requires restart)
302 //
303 // scrollback_lines_to_serialize 10000
304
305 // Define color themes for Zellij
306 // For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
307 // Once these themes are defined, one of them should to be selected in the "theme" section of this file
308 //
309 // themes {
310 // dracula {
311 // fg 248 248 242
312 // bg 40 42 54
313 // red 255 85 85
314 // green 80 250 123
315 // yellow 241 250 140
316 // blue 98 114 164
317 // magenta 255 121 198
318 // orange 255 184 108
319 // cyan 139 233 253
320 // black 0 0 0
321 // white 255 255 255
322 // }
323 // }
324
325 // Choose the theme that is specified in the themes section.
326 // Default: default
327 //
328 theme "nord"
329
330 // The name of the default layout to load on startup
331 // Default: "default"
332 // (Requires restart)
333 //
334 default_layout "compact"
335
336 // Choose the mode that zellij uses when starting up.
337 // Default: normal
338 //
339 default_mode "locked"
340
341 // Toggle enabling the mouse mode.
342 // On certain configurations, or terminals this could
343 // potentially interfere with copying text.
344 // (Requires restart)
345 // Options:
346 // - true (default)
347 // - false
348 //
349 // mouse_mode false
350
351 // Configure the scroll back buffer size
352 // This is the number of lines zellij stores for each pane in the scroll back
353 // buffer. Excess number of lines are discarded in a FIFO fashion.
354 // (Requires restart)
355 // Valid values: positive integers
356 // Default value: 10000
357 //
358 // scroll_buffer_size 10000
359
360 // Provide a command to execute when copying text. The text will be piped to
361 // the stdin of the program to perform the copy. This can be used with
362 // terminal emulators which do not support the OSC 52 ANSI control sequence
363 // that will be used by default if this option is not set.
364 // Examples:
365 //
366 // copy_command "xclip -selection clipboard" // x11
367 // copy_command "wl-copy" // wayland
368 // copy_command "pbcopy" // osx
369
370 // Choose the destination for copied text
371 // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
372 // Does not apply when using copy_command.
373 // Options:
374 // - system (default)
375 // - primary
376 //
377 // copy_clipboard "primary"
378
379 // Enable or disable automatic copy (and clear) of selection when releasing mouse
380 // Default: true
381 //
382 // copy_on_select false
383
384 // Path to the default editor to use to edit pane scrollbuffer
385 // Default: $EDITOR or $VISUAL
386 //
387 // scrollback_editor "/usr/bin/vim"
388
389 // When attaching to an existing session with other users,
390 // should the session be mirrored (true)
391 // or should each user have their own cursor (false)
392 // (Requires restart)
393 // Default: false
394 //
395 // mirror_session true
396
397 // The folder in which Zellij will look for layouts
398 // (Requires restart)
399 //
400 // layout_dir "/home/sb/.config/zellij/layouts/"
401
402 // The folder in which Zellij will look for themes
403 // (Requires restart)
404 //
405 // theme_dir "/path/to/my/theme_dir"
406
407 // Enable or disable the rendering of styled and colored underlines (undercurl).
408 // May need to be disabled for certain unsupported terminals
409 // (Requires restart)
410 // Default: true
411 //
412 // styled_underlines false
413
414 // Enable or disable writing of session metadata to disk (if disabled, other sessions might not know
415 // metadata info on this session)
416 // (Requires restart)
417 // Default: false
418 //
419 // disable_session_metadata true
420
421 // Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it)
422 // (Requires restart)
423 // Default: true (if the host terminal supports it)
424 //
425 // support_kitty_keyboard_protocol false
426
427 // Whether to stack panes when resizing beyond a certain size
428 // Default: true
429 //
430 // stacked_resize false
431
432 // Whether to show release notes on first version run
433 // Default: true
434 //
435 // show_release_notes false
436
437 // Whether to show startup tips on session start
438 // Default: true
439 //
440 // show_startup_tips false