switch tmux -> zellij
This commit is contained in:
parent
8901da10f7
commit
356daee7d1
4 changed files with 235 additions and 2 deletions
123
modules/features/programs/cli/cli-zellij.nix
Normal file
123
modules/features/programs/cli/cli-zellij.nix
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
config.dendritic.features.cli-zellij = {
|
||||
homeModules = [
|
||||
(
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
zjstatus-pkg = inputs.zjstatus.packages.${pkgs.system}.default;
|
||||
in
|
||||
{
|
||||
stylix.targets.zellij.enable = false;
|
||||
stylix.targets.tmux.enable = false;
|
||||
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
settings = {
|
||||
show_startup_tips = false;
|
||||
pane_frames = false;
|
||||
default_mode = "locked";
|
||||
mouse_mode = true;
|
||||
simplified_ui = true;
|
||||
on_force_close = "detach";
|
||||
copy_command = "wl-copy";
|
||||
default_shell = "zsh";
|
||||
|
||||
theme = "dendritic";
|
||||
themes.dendritic = {
|
||||
fg = "#${config.lib.stylix.colors.base05}";
|
||||
bg = "#${config.lib.stylix.colors.base00}";
|
||||
black = "#${config.lib.stylix.colors.base01}";
|
||||
red = "#${config.lib.stylix.colors.base08}";
|
||||
green = "#${config.lib.stylix.colors.base0B}";
|
||||
yellow = "#${config.lib.stylix.colors.base0A}";
|
||||
blue = "#${config.lib.stylix.colors.base0D}";
|
||||
magenta = "#${config.lib.stylix.colors.base0E}";
|
||||
cyan = "#${config.lib.stylix.colors.base0C}";
|
||||
white = "#${config.lib.stylix.colors.base07}";
|
||||
orange = "#${config.lib.stylix.colors.base09}";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
layout {
|
||||
default_tab_template {
|
||||
pane size=2 borderless=true {
|
||||
plugin location="file://${zjstatus-pkg}/bin/zjstatus.wasm" {
|
||||
format_left "{mode}#[bg=#${config.lib.stylix.colors.base00}] {tabs}"
|
||||
format_center ""
|
||||
format_right "#[bg=#${config.lib.stylix.colors.base00},fg=#${config.lib.stylix.colors.base0D}]#[bg=#${config.lib.stylix.colors.base0D},fg=#${config.lib.stylix.colors.base00},bold] #[bg=#${config.lib.stylix.colors.base02},fg=#${config.lib.stylix.colors.base05},bold] {session} "
|
||||
format_space ""
|
||||
|
||||
mode_locked "#[bg=#${config.lib.stylix.colors.base08},fg=#${config.lib.stylix.colors.base00},bold] 🔒 LOCKED #[bg=#${config.lib.stylix.colors.base03},fg=#${config.lib.stylix.colors.base08}]█"
|
||||
mode_normal "#[bg=#${config.lib.stylix.colors.base0B},fg=#${config.lib.stylix.colors.base00},bold] 🔓 NORMAL #[bg=#${config.lib.stylix.colors.base03},fg=#${config.lib.stylix.colors.base0B}]█"
|
||||
mode_scroll "#[bg=#${config.lib.stylix.colors.base0A},fg=#${config.lib.stylix.colors.base00},bold] SCROLL #[bg=#${config.lib.stylix.colors.base03},fg=#${config.lib.stylix.colors.base0A}]█"
|
||||
|
||||
tab_normal "#[bg=#${config.lib.stylix.colors.base03},fg=#${config.lib.stylix.colors.base0D}]█#[bg=#${config.lib.stylix.colors.base0D},fg=#${config.lib.stylix.colors.base00},bold]{index} #[bg=#${config.lib.stylix.colors.base02},fg=#${config.lib.stylix.colors.base05},bold] {name}#[bg=#${config.lib.stylix.colors.base03},fg=#${config.lib.stylix.colors.base02},bold]█"
|
||||
tab_active "#[bg=#${config.lib.stylix.colors.base03},fg=#${config.lib.stylix.colors.base09}]█#[bg=#${config.lib.stylix.colors.base09},fg=#${config.lib.stylix.colors.base00},bold]{index} #[bg=#${config.lib.stylix.colors.base02},fg=#${config.lib.stylix.colors.base05},bold] {name}#[bg=#${config.lib.stylix.colors.base03},fg=#${config.lib.stylix.colors.base02},bold]█"
|
||||
tab_separator "#[bg=#${config.lib.stylix.colors.base00}] "
|
||||
}
|
||||
}
|
||||
children
|
||||
}
|
||||
}
|
||||
|
||||
keybinds clear-defaults=true {
|
||||
shared {
|
||||
bind "Alt h" { MoveFocus "Left"; }
|
||||
bind "Alt j" { MoveFocus "Down"; }
|
||||
bind "Alt k" { MoveFocus "Up"; }
|
||||
bind "Alt l" { MoveFocus "Right"; }
|
||||
bind "Alt f" { ToggleFloatingPanes; }
|
||||
bind "Alt n" { NewPane; }
|
||||
}
|
||||
|
||||
locked {
|
||||
bind "Ctrl b" { SwitchToMode "Normal"; }
|
||||
}
|
||||
|
||||
normal {
|
||||
bind "Ctrl b" { SwitchToMode "Locked"; }
|
||||
bind "Enter" "Esc" { SwitchToMode "Locked"; }
|
||||
|
||||
bind "h" { MoveFocus "Left"; }
|
||||
bind "j" { MoveFocus "Down"; }
|
||||
bind "k" { MoveFocus "Up"; }
|
||||
bind "l" { MoveFocus "Right"; }
|
||||
bind "|" { NewPane "Right"; }
|
||||
bind "-" { NewPane "Down"; }
|
||||
bind "x" { CloseFocus; }
|
||||
bind "f" { ToggleFloatingPanes; }
|
||||
bind "z" { ToggleFocusFullscreen; }
|
||||
bind "t" { NewTab; }
|
||||
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
|
||||
|
||||
bind "s" { SwitchToMode "Scroll"; }
|
||||
bind "d" { Detach; }
|
||||
bind "q" { Quit; }
|
||||
}
|
||||
|
||||
scroll {
|
||||
bind "s" "Esc" "Enter" { SwitchToMode "Normal"; }
|
||||
bind "j" { ScrollDown; }
|
||||
bind "k" { ScrollUp; }
|
||||
bind "d" { HalfPageScrollDown; }
|
||||
bind "u" { HalfPageScrollUp; }
|
||||
}
|
||||
|
||||
renametab {
|
||||
bind "Enter" "Esc" { SwitchToMode "Normal"; }
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue