dotfiles

My PC Dotfiles & Website

files/windows/zellij.kdl (19904B)


  1keybinds clear-defaults=true {
  2    locked {
  3        bind "Ctrl g" { SwitchToMode "normal"; }
  4    }
  5    pane {
  6        bind "left" { MoveFocus "left"; }
  7        bind "down" { MoveFocus "down"; }
  8        bind "up" { MoveFocus "up"; }
  9        bind "right" { MoveFocus "right"; }
 10        bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; }
 11        bind "d" { NewPane "down"; SwitchToMode "normal"; }
 12        bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; }
 13        bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; }
 14        bind "h" { MoveFocus "left"; }
 15        bind "i" { TogglePanePinned; SwitchToMode "normal"; }
 16        bind "j" { MoveFocus "down"; }
 17        bind "k" { MoveFocus "up"; }
 18        bind "l" { MoveFocus "right"; }
 19        bind "n" { NewPane; SwitchToMode "normal"; }
 20        bind "p" { SwitchFocus; }
 21        bind "Ctrl p" { SwitchToMode "normal"; }
 22        bind "r" { NewPane "right"; SwitchToMode "normal"; }
 23        bind "s" { NewPane "stacked"; SwitchToMode "normal"; }
 24        bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; }
 25        bind "z" { TogglePaneFrames; SwitchToMode "normal"; }
 26    }
 27    tab {
 28        bind "left" { GoToPreviousTab; }
 29        bind "down" { GoToNextTab; }
 30        bind "up" { GoToPreviousTab; }
 31        bind "right" { GoToNextTab; }
 32        bind "1" { GoToTab 1; SwitchToMode "normal"; }
 33        bind "2" { GoToTab 2; SwitchToMode "normal"; }
 34        bind "3" { GoToTab 3; SwitchToMode "normal"; }
 35        bind "4" { GoToTab 4; SwitchToMode "normal"; }
 36        bind "5" { GoToTab 5; SwitchToMode "normal"; }
 37        bind "6" { GoToTab 6; SwitchToMode "normal"; }
 38        bind "7" { GoToTab 7; SwitchToMode "normal"; }
 39        bind "8" { GoToTab 8; SwitchToMode "normal"; }
 40        bind "9" { GoToTab 9; SwitchToMode "normal"; }
 41        bind "[" { BreakPaneLeft; SwitchToMode "normal"; }
 42        bind "]" { BreakPaneRight; SwitchToMode "normal"; }
 43        bind "b" { BreakPane; SwitchToMode "normal"; }
 44        bind "h" { GoToPreviousTab; }
 45        bind "j" { GoToNextTab; }
 46        bind "k" { GoToPreviousTab; }
 47        bind "l" { GoToNextTab; }
 48        bind "n" { NewTab; SwitchToMode "normal"; }
 49        bind "r" { SwitchToMode "renametab"; TabNameInput 0; }
 50        bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; }
 51        bind "Ctrl t" { SwitchToMode "normal"; }
 52        bind "x" { CloseTab; SwitchToMode "normal"; }
 53        bind "tab" { ToggleTab; }
 54    }
 55    resize {
 56        bind "left" { Resize "Increase left"; }
 57        bind "down" { Resize "Increase down"; }
 58        bind "up" { Resize "Increase up"; }
 59        bind "right" { Resize "Increase right"; }
 60        bind "+" { Resize "Increase"; }
 61        bind "-" { Resize "Decrease"; }
 62        bind "=" { Resize "Increase"; }
 63        bind "H" { Resize "Decrease left"; }
 64        bind "J" { Resize "Decrease down"; }
 65        bind "K" { Resize "Decrease up"; }
 66        bind "L" { Resize "Decrease right"; }
 67        bind "h" { Resize "Increase left"; }
 68        bind "j" { Resize "Increase down"; }
 69        bind "k" { Resize "Increase up"; }
 70        bind "l" { Resize "Increase right"; }
 71        bind "Ctrl n" { SwitchToMode "normal"; }
 72    }
 73    move {
 74        bind "left" { MovePane "left"; }
 75        bind "down" { MovePane "down"; }
 76        bind "up" { MovePane "up"; }
 77        bind "right" { MovePane "right"; }
 78        bind "h" { MovePane "left"; }
 79        bind "Ctrl h" { SwitchToMode "normal"; }
 80        bind "j" { MovePane "down"; }
 81        bind "k" { MovePane "up"; }
 82        bind "l" { MovePane "right"; }
 83        bind "n" { MovePane; }
 84        bind "p" { MovePaneBackwards; }
 85        bind "tab" { MovePane; }
 86    }
 87    scroll {
 88        bind "Alt left" { MoveFocusOrTab "left"; SwitchToMode "normal"; }
 89        bind "Alt down" { MoveFocus "down"; SwitchToMode "normal"; }
 90        bind "Alt up" { MoveFocus "up"; SwitchToMode "normal"; }
 91        bind "Alt right" { MoveFocusOrTab "right"; SwitchToMode "normal"; }
 92        bind "e" { EditScrollback; SwitchToMode "normal"; }
 93        bind "Alt h" { MoveFocusOrTab "left"; SwitchToMode "normal"; }
 94        bind "Alt j" { MoveFocus "down"; SwitchToMode "normal"; }
 95        bind "Alt k" { MoveFocus "up"; SwitchToMode "normal"; }
 96        bind "Alt l" { MoveFocusOrTab "right"; SwitchToMode "normal"; }
 97        bind "s" { SwitchToMode "entersearch"; SearchInput 0; }
 98    }
 99    search {
100        bind "c" { SearchToggleOption "CaseSensitivity"; }
101        bind "n" { Search "down"; }
102        bind "o" { SearchToggleOption "WholeWord"; }
103        bind "p" { Search "up"; }
104        bind "w" { SearchToggleOption "Wrap"; }
105    }
106    session {
107        bind "a" {
108            LaunchOrFocusPlugin "zellij:about" {
109                floating true
110                move_to_focused_tab true
111            }
112            SwitchToMode "normal"
113        }
114        bind "c" {
115            LaunchOrFocusPlugin "configuration" {
116                floating true
117                move_to_focused_tab true
118            }
119            SwitchToMode "normal"
120        }
121        bind "l" {
122            LaunchOrFocusPlugin "zellij:layout-manager" {
123                floating true
124                move_to_focused_tab true
125            }
126            SwitchToMode "normal"
127        }
128        bind "Ctrl o" { SwitchToMode "normal"; }
129        bind "p" {
130            LaunchOrFocusPlugin "plugin-manager" {
131                floating true
132                move_to_focused_tab true
133            }
134            SwitchToMode "normal"
135        }
136        bind "s" {
137            LaunchOrFocusPlugin "zellij:share" {
138                floating true
139                move_to_focused_tab true
140            }
141            SwitchToMode "normal"
142        }
143        bind "w" {
144            LaunchOrFocusPlugin "session-manager" {
145                floating true
146                move_to_focused_tab true
147            }
148            SwitchToMode "normal"
149        }
150    }
151    shared_except "locked" {
152        bind "Alt +" { Resize "Increase"; }
153        bind "Alt -" { Resize "Decrease"; }
154        bind "Alt =" { Resize "Increase"; }
155        bind "Alt [" { PreviousSwapLayout; }
156        bind "Alt ]" { NextSwapLayout; }
157        bind "Alt f" { ToggleFloatingPanes; }
158        bind "Ctrl g" { SwitchToMode "locked"; }
159        bind "Alt i" { MoveTab "left"; }
160        bind "Alt n" { NewPane; }
161        bind "Alt o" { MoveTab "right"; }
162        bind "Alt p" { TogglePaneInGroup; }
163        bind "Alt Shift p" { ToggleGroupMarking; }
164        bind "Ctrl q" { Quit; }
165    }
166    shared_except "locked" "move" {
167        bind "Ctrl h" { SwitchToMode "move"; }
168    }
169    shared_except "locked" "session" {
170        bind "Ctrl o" { SwitchToMode "session"; }
171    }
172    shared_except "locked" "scroll" {
173        bind "Alt left" { MoveFocusOrTab "left"; }
174        bind "Alt down" { MoveFocus "down"; }
175        bind "Alt up" { MoveFocus "up"; }
176        bind "Alt right" { MoveFocusOrTab "right"; }
177        bind "Alt h" { MoveFocusOrTab "left"; }
178        bind "Alt j" { MoveFocus "down"; }
179        bind "Alt k" { MoveFocus "up"; }
180        bind "Alt l" { MoveFocusOrTab "right"; }
181    }
182    shared_except "locked" "scroll" "search" "tmux" {
183        bind "Ctrl b" { SwitchToMode "tmux"; }
184    }
185    shared_except "locked" "scroll" "search" {
186        bind "Ctrl s" { SwitchToMode "scroll"; }
187    }
188    shared_except "locked" "tab" {
189        bind "Ctrl t" { SwitchToMode "tab"; }
190    }
191    shared_except "locked" "pane" {
192        bind "Ctrl p" { SwitchToMode "pane"; }
193    }
194    shared_except "locked" "resize" {
195        bind "Ctrl n" { SwitchToMode "resize"; }
196    }
197    shared_except "normal" "locked" "entersearch" {
198        bind "enter" { SwitchToMode "normal"; }
199    }
200    shared_except "normal" "locked" "entersearch" "renametab" "renamepane" {
201        bind "esc" { SwitchToMode "normal"; }
202    }
203    shared_among "pane" "tmux" {
204        bind "x" { CloseFocus; SwitchToMode "normal"; }
205    }
206    shared_among "scroll" "search" {
207        bind "PageDown" { PageScrollDown; }
208        bind "PageUp" { PageScrollUp; }
209        bind "left" { PageScrollUp; }
210        bind "down" { ScrollDown; }
211        bind "up" { ScrollUp; }
212        bind "right" { PageScrollDown; }
213        bind "Ctrl b" { PageScrollUp; }
214        bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; }
215        bind "d" { HalfPageScrollDown; }
216        bind "Ctrl f" { PageScrollDown; }
217        bind "h" { PageScrollUp; }
218        bind "j" { ScrollDown; }
219        bind "k" { ScrollUp; }
220        bind "l" { PageScrollDown; }
221        bind "Ctrl s" { SwitchToMode "normal"; }
222        bind "u" { HalfPageScrollUp; }
223    }
224    entersearch {
225        bind "Ctrl c" { SwitchToMode "scroll"; }
226        bind "esc" { SwitchToMode "scroll"; }
227        bind "enter" { SwitchToMode "search"; }
228    }
229    renametab {
230        bind "esc" { UndoRenameTab; SwitchToMode "tab"; }
231    }
232    shared_among "renametab" "renamepane" {
233        bind "Ctrl c" { SwitchToMode "normal"; }
234    }
235    renamepane {
236        bind "esc" { UndoRenamePane; SwitchToMode "pane"; }
237    }
238    shared_among "session" "tmux" {
239        bind "d" { Detach; }
240    }
241    tmux {
242        bind "left" { MoveFocus "left"; SwitchToMode "normal"; }
243        bind "down" { MoveFocus "down"; SwitchToMode "normal"; }
244        bind "up" { MoveFocus "up"; SwitchToMode "normal"; }
245        bind "right" { MoveFocus "right"; SwitchToMode "normal"; }
246        bind "space" { NextSwapLayout; }
247        bind "\"" { NewPane "down"; SwitchToMode "normal"; }
248        bind "%" { NewPane "right"; SwitchToMode "normal"; }
249        bind "," { SwitchToMode "renametab"; }
250        bind "[" { SwitchToMode "scroll"; }
251        bind "Ctrl b" { Write 2; SwitchToMode "normal"; }
252        bind "c" { NewTab; SwitchToMode "normal"; }
253        bind "h" { MoveFocus "left"; SwitchToMode "normal"; }
254        bind "j" { MoveFocus "down"; SwitchToMode "normal"; }
255        bind "k" { MoveFocus "up"; SwitchToMode "normal"; }
256        bind "l" { MoveFocus "right"; SwitchToMode "normal"; }
257        bind "n" { GoToNextTab; SwitchToMode "normal"; }
258        bind "o" { FocusNextPane; }
259        bind "p" { GoToPreviousTab; SwitchToMode "normal"; }
260        bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; }
261    }
262}
263
264// Plugin aliases - can be used to change the implementation of Zellij
265// changing these requires a restart to take effect
266plugins {
267    about location="zellij:about"
268    compact-bar location="zellij:compact-bar"
269    configuration location="zellij:configuration"
270    filepicker location="zellij:strider" {
271        cwd "/"
272    }
273    plugin-manager location="zellij:plugin-manager"
274    session-manager location="zellij:session-manager"
275    status-bar location="zellij:status-bar"
276    strider location="zellij:strider"
277    tab-bar location="zellij:tab-bar"
278    welcome-screen location="zellij:session-manager" {
279        welcome_screen true
280    }
281}
282
283// Plugins to load in the background when a new session starts
284// eg. "file:/path/to/my-plugin.wasm"
285// eg. "https://example.com/my-plugin.wasm"
286load_plugins {
287    zellij:link
288}
289web_client {
290    font "monospace"
291}
292 
293// Use a simplified UI without special fonts (arrow glyphs)
294// Options:
295//   - true
296//   - false (Default)
297// 
298// simplified_ui true
299 
300// Enable OSC8 hyperlink output
301// Options:
302//   - true (Default)
303//   - false
304// 
305// osc8_hyperlinks true
306 
307// Choose the theme that is specified in the themes section.
308// Default: default
309// 
310theme "ao"
311 
312// Choose the base input mode of zellij.
313// Default: normal
314// 
315default_mode "normal"
316 
317// Choose the path to the default shell that zellij will use for opening new panes
318// Default: $SHELL
319// 
320// default_shell "fish"
321 
322// Choose the path to override cwd that zellij will use for opening new panes
323// 
324// default_cwd "/tmp"
325 
326// The name of the default layout to load on startup
327// Default: "default"
328// 
329// default_layout "compact"
330 
331// The folder in which Zellij will look for layouts
332// (Requires restart)
333// 
334// layout_dir "/tmp"
335 
336// The folder in which Zellij will look for themes
337// (Requires restart)
338// 
339// theme_dir "/tmp"
340 
341// Toggle enabling the mouse mode.
342// On certain configurations, or terminals this could
343// potentially interfere with copying text.
344// Options:
345//   - true (default)
346//   - false
347// 
348// mouse_mode false
349 
350// Toggle having pane frames around the panes
351// Options:
352//   - true (default, enabled)
353//   - false
354// 
355// pane_frames false
356 
357// When attaching to an existing session with other users,
358// should the session be mirrored (true)
359// or should each user have their own cursor (false)
360// (Requires restart)
361// Default: false
362// 
363// mirror_session true
364 
365// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
366// eg. when terminal window with an active zellij session is closed
367// (Requires restart)
368// Options:
369//   - detach (Default)
370//   - quit
371// 
372// on_force_close "quit"
373 
374// Configure the scroll back buffer size
375// This is the number of lines zellij stores for each pane in the scroll back
376// buffer. Excess number of lines are discarded in a FIFO fashion.
377// (Requires restart)
378// Valid values: positive integers
379// Default value: 10000
380// 
381// scroll_buffer_size 10000
382 
383// Provide a command to execute when copying text. The text will be piped to
384// the stdin of the program to perform the copy. This can be used with
385// terminal emulators which do not support the OSC 52 ANSI control sequence
386// that will be used by default if this option is not set.
387// Examples:
388//
389// copy_command "xclip -selection clipboard" // x11
390// copy_command "wl-copy"                    // wayland
391// copy_command "pbcopy"                     // osx
392// 
393// copy_command "pbcopy"
394 
395// Choose the destination for copied text
396// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
397// Does not apply when using copy_command.
398// Options:
399//   - system (default)
400//   - primary
401// 
402// copy_clipboard "primary"
403 
404// Enable automatic copying (and clearing) of selection when releasing mouse
405// Default: true
406// 
407// copy_on_select true
408 
409// Path to the default editor to use to edit pane scrollbuffer
410// Default: $EDITOR or $VISUAL
411// scrollback_editor "/usr/bin/vim"
412 
413// A fixed name to always give the Zellij session.
414// Consider also setting `attach_to_session true,`
415// otherwise this will error if such a session exists.
416// Default: <RANDOM>
417// 
418// session_name "My singleton session"
419 
420// When `session_name` is provided, attaches to that session
421// if it is already running or creates it otherwise.
422// Default: false
423// 
424// attach_to_session true
425 
426// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
427// Options:
428//   - true (default)
429//   - false
430// 
431// auto_layout false
432 
433// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
434// Options:
435//   - true (default)
436//   - false
437// 
438// session_serialization false
439 
440// Whether pane viewports are serialized along with the session, default is false
441// Options:
442//   - true
443//   - false (default)
444// 
445// serialize_pane_viewport false
446 
447// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
448// defaults to the scrollback size. If this number is higher than the scrollback size, it will
449// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
450// 
451// scrollback_lines_to_serialize 10000
452 
453// Enable or disable the rendering of styled and colored underlines (undercurl).
454// May need to be disabled for certain unsupported terminals
455// (Requires restart)
456// Default: true
457// 
458// styled_underlines false
459 
460// How often in seconds sessions are serialized
461// 
462// serialization_interval 10000
463 
464// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know
465// metadata info on this session)
466// (Requires restart)
467// Default: false
468// 
469// disable_session_metadata false
470 
471// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it)
472// (Requires restart)
473// Default: true (if the host terminal supports it)
474// 
475// support_kitty_keyboard_protocol false
476// Whether to make sure a local web server is running when a new Zellij session starts.
477// This web server will allow creating new sessions and attaching to existing ones that have
478// opted in to being shared in the browser.
479// When enabled, navigate to http://127.0.0.1:8082
480// (Requires restart)
481// 
482// Note: a local web server can still be manually started from within a Zellij session or from the CLI.
483// If this is not desired, one can use a version of Zellij compiled without
484// `web_server_capability`
485// 
486// Possible values:
487// - true
488// - false
489// Default: false
490// 
491// web_server false
492// Whether to allow sessions started in the terminal to be shared through a local web server, assuming one is
493// running (see the `web_server` option for more details).
494// (Requires restart)
495// 
496// Note: This is an administrative separation and not intended as a security measure.
497// 
498// Possible values:
499// - "on" (allow web sharing through the local web server if it
500// is online)
501// - "off" (do not allow web sharing unless sessions explicitly opt-in to it)
502// - "disabled" (do not allow web sharing and do not permit sessions started in the terminal to opt-in to it)
503// Default: "off"
504// 
505// web_sharing "off"
506// A path to a certificate file to be used when setting up the web client to serve the
507// connection over HTTPs
508// 
509// web_server_cert "/path/to/cert.pem"
510// A path to a key file to be used when setting up the web client to serve the
511// connection over HTTPs
512// 
513// web_server_key "/path/to/key.pem"
514/// Whether to enforce https connections to the web server when it is bound to localhost
515/// (127.0.0.0/8)
516///
517/// Note: https is ALWAYS enforced when bound to non-local interfaces
518///
519/// Default: false
520// 
521// enforce_https_for_localhost false
522 
523// Whether to stack panes when resizing beyond a certain size
524// Default: true
525// 
526// stacked_resize false
527 
528// Whether to show tips on startup
529// Default: true
530// 
531show_startup_tips false
532 
533// Whether to show release notes on first version run
534// Default: true
535// 
536// show_release_notes false
537 
538// Whether to enable mouse hover effects and pane grouping functionality
539// default is true
540// advanced_mouse_actions false
541 
542// Whether to enable mouse hover visual effects (frame highlight and help text)
543// default is true
544// mouse_hover_effects false
545 
546// Whether to show visual bell indicators (pane/tab frame flash and [!] suffix)
547// default is true
548// visual_bell true
549 
550// Whether to focus panes on mouse hover
551// default is false
552// focus_follows_mouse false
553 
554// Whether clicking a pane to focus it also sends the click into the pane
555// default is false
556// mouse_click_through false
557 
558// The ip address the web server should listen on when it starts
559// Default: "127.0.0.1"
560// (Requires restart)
561// web_server_ip "127.0.0.1"
562 
563// The port the web server should listen on when it starts
564// Default: 8082
565// (Requires restart)
566// web_server_port 8082
567 
568// A command to run (will be wrapped with sh -c and provided the RESURRECT_COMMAND env variable) 
569// after Zellij attempts to discover a command inside a pane when resurrecting sessions, the STDOUT
570// of this command will be used instead of the discovered RESURRECT_COMMAND
571// can be useful for removing wrappers around commands
572// Note: be sure to escape backslashes and similar characters properly
573// post_command_discovery_hook "echo $RESURRECT_COMMAND | sed <your_regex_here>"
574
575// Number of async worker tasks to spawn per active client.
576//
577// Allocating few tasks may result in resource contention and lags. Small values (around 4) should
578// typically work best. Set to 0 to use the number of (physical) CPU cores.
579// Note: This only applies to web clients at the moment.
580// client_async_worker_tasks 4