From 9b641fe2fdf2252d757771718f7e83368146407e Mon Sep 17 00:00:00 2001 From: shelken Date: Thu, 24 Oct 2024 20:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20zellij=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/apps/kitty/default.nix | 20 ++++++++++---------- home/apps/zellij/config.kdl | 11 +++++++++++ home/apps/zellij/default.nix | 20 +++++++++++++++++--- 3 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 home/apps/zellij/config.kdl diff --git a/home/apps/kitty/default.nix b/home/apps/kitty/default.nix index 345b844..e277503 100644 --- a/home/apps/kitty/default.nix +++ b/home/apps/kitty/default.nix @@ -31,16 +31,16 @@ hash = "sha256-TLltUcfJpY+3rwvHYgtN4zBpbBnLBYyzDu90UMnxwoc="; }; in { - programs.kitty = { - enable = false; # 用 homebrew 安装 - theme = theme; - shellIntegration.mode = shell_integration; - extraConfig = builtins.readFile ./kitty.conf; - environment = { - # not use `xterm-kitty` - # "TERM" = "xterm-256color"; - }; - }; + # programs.kitty = { + # enable = false; # 用 homebrew 安装 + # theme = theme; + # shellIntegration.mode = shell_integration; + # extraConfig = builtins.readFile ./kitty.conf; + # environment = { + # # not use `xterm-kitty` + # # "TERM" = "xterm-256color"; + # }; + # }; xdg.configFile."kitty/kitty.conf" = { text = concatStrings [ diff --git a/home/apps/zellij/config.kdl b/home/apps/zellij/config.kdl new file mode 100644 index 0000000..8744a60 --- /dev/null +++ b/home/apps/zellij/config.kdl @@ -0,0 +1,11 @@ +// theme "catppuccin-macchiato" + +session_serialization true + +keybinds { + normal { + unbind "Ctrl q" "Ctrl s" // for vim + bind "Ctrl f" { SwitchToMode "Scroll"; } + bind "Ctrl x" { Quit; } + } +} diff --git a/home/apps/zellij/default.nix b/home/apps/zellij/default.nix index 33a9616..518ff3d 100644 --- a/home/apps/zellij/default.nix +++ b/home/apps/zellij/default.nix @@ -4,11 +4,25 @@ ... }: let theme = "catppuccin-${lib.strings.toLower myvars.catppuccin_flavor}"; + origin_file = builtins.readFile ./config.kdl; + inherit (lib) concatStrings; in { programs.zellij = { enable = true; - settings = { - theme = theme; - }; + # settings = { + # theme = theme; + # }; + enableBashIntegration = false; + enableZshIntegration = false; + }; + + xdg.configFile."zellij/config.kdl" = { + text = concatStrings [ + '' + // 主题配色 + theme "${theme}" + '' + origin_file + ]; }; }