feat(zellij): init

This commit is contained in:
winston 2024-04-23 06:34:40 +02:00
parent ecd11fdc98
commit 7a42db9d6f
Signed by: winston
GPG key ID: 3786770EDBC2B481
4 changed files with 123 additions and 0 deletions

View file

@ -19,6 +19,7 @@
./vscode.nix ./vscode.nix
./waybar.nix ./waybar.nix
./wezterm.nix ./wezterm.nix
./zellij.nix
./zsh.nix ./zsh.nix
]; ];
} }

4
home/apps/zellij.nix Normal file
View file

@ -0,0 +1,4 @@
{
programs.zellij.enable = true;
xdg.configFile."zellij".source = ./zellij;
}

111
home/apps/zellij/config.kdl Normal file
View file

@ -0,0 +1,111 @@
keybinds clear-defaults=true {
tmux {
bind "Ctrl s" { Write 2; SwitchToMode "Normal"; }
bind "v" { SwitchToMode "Scroll"; }
bind "f" { SwitchToMode "EnterSearch"; }
bind "," { SwitchToMode "RenameTab"; }
bind "r" { SwitchToMode "Resize"; }
bind "s" {
LaunchOrFocusPlugin "session-manager" {
floating true
move_to_focused_tab true
};
SwitchToMode "Normal"
}
bind "c" { NewTab; SwitchToMode "Normal"; }
bind "-" { NewPane "Down"; SwitchToMode "Normal"; }
bind "\\" { NewPane "Right"; SwitchToMode "Normal"; }
bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
bind "h" "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
bind "j" "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
bind "k" "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
bind "l" "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
bind "d" { Detach; }
bind "x" { CloseFocus; SwitchToMode "Normal"; }
bind "1" { GoToTab 1; SwitchToMode "Normal"; }
bind "2" { GoToTab 2; SwitchToMode "Normal"; }
bind "3" { GoToTab 3; SwitchToMode "Normal"; }
bind "4" { GoToTab 4; SwitchToMode "Normal"; }
bind "5" { GoToTab 5; SwitchToMode "Normal"; }
bind "6" { GoToTab 6; SwitchToMode "Normal"; }
bind "7" { GoToTab 7; SwitchToMode "Normal"; }
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
}
resize {
bind "h" "Left" { Resize "Increase Left"; }
bind "j" "Down" { Resize "Increase Down"; }
bind "k" "Up" { Resize "Increase Up"; }
bind "l" "Right" { Resize "Increase Right"; }
bind "H" { Resize "Decrease Left"; }
bind "J" { Resize "Decrease Down"; }
bind "K" { Resize "Decrease Up"; }
bind "L" { Resize "Decrease Right"; }
bind "=" "+" { Resize "Increase"; }
bind "-" { Resize "Decrease"; }
}
scroll {
bind "Ctrl v" { SwitchToMode "Normal"; }
bind "e" { EditScrollback; SwitchToMode "Normal"; }
bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "Alt c" { Copy; }
}
search {
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "n" { Search "down"; }
bind "p" { Search "up"; }
bind "c" { SearchToggleOption "CaseSensitivity"; }
bind "w" { SearchToggleOption "Wrap"; }
bind "o" { SearchToggleOption "WholeWord"; }
}
entersearch {
bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
bind "Enter" { SwitchToMode "Search"; }
}
renametab {
bind "Ctrl c" { SwitchToMode "Normal"; }
bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
}
shared_except "normal" {
bind "Enter" "Esc" { SwitchToMode "Normal"; }
}
shared_except "tmux" {
bind "Ctrl s" { SwitchToMode "Tmux"; }
}
}
plugins {
status-bar location="zellij:status-bar"
compact-bar location="zellij:compact-bar"
session-manager location="zellij:session-manager"
}
copy_on_select false
theme "catppuccin-mocha"
pane_frames false

View file

@ -0,0 +1,7 @@
layout {
pane
pane size=1 borderless=true {
plugin location="compact-bar"
plugin location="status-bar"
}
}