From 37751c1586ab7ad3ff4254c7982f82f1aea4b967 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Sat, 11 Apr 2026 16:33:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=A8=20zellij=20=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=20tmux=20=E4=BD=9C=E4=B8=BA=E7=BB=88=E7=AB=AF=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 - home/shell/default.nix | 1 - home/shell/tmux.nix | 51 ------------------------------------------ home/shell/tools.nix | 6 +++++ 4 files changed, 6 insertions(+), 53 deletions(-) delete mode 100644 home/shell/tmux.nix diff --git a/README.md b/README.md index 215556a..d947e56 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,6 @@ sudo nixos-rebuild switch --flake .#wsl │ │ └── git.nix │ └── shell/ # Shell 配置 │ ├── fish.nix # Fish shell -│ ├── tmux.nix │ ├── starship.nix # Prompt │ └── tools.nix # fzf, atuin, zoxide 等 ├── lib/default.nix # 构建辅助函数 diff --git a/home/shell/default.nix b/home/shell/default.nix index 5760afd..ee9845c 100644 --- a/home/shell/default.nix +++ b/home/shell/default.nix @@ -3,6 +3,5 @@ ./fish.nix ./starship.nix ./tools.nix - ./tmux.nix ]; } diff --git a/home/shell/tmux.nix b/home/shell/tmux.nix deleted file mode 100644 index aecba95..0000000 --- a/home/shell/tmux.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ pkgs, ... }: - -{ - programs.tmux = { - enable = true; - baseIndex = 1; - escapeTime = 10; - historyLimit = 50000; - keyMode = "vi"; - mouse = true; - terminal = "tmux-256color"; - prefix = "C-a"; - - plugins = with pkgs.tmuxPlugins; [ - sensible - vim-tmux-navigator - yank - ]; - - extraConfig = '' - # ── True color support ── - set -ag terminal-overrides ",xterm-256color:RGB" - - # ── Split panes ── - bind v split-window -h -c "#{pane_current_path}" - bind s split-window -v -c "#{pane_current_path}" - unbind '"' - unbind % - - # ── New window in current path ── - bind c new-window -c "#{pane_current_path}" - - # ── Reload config ── - bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded!" - - # ── Resize panes ── - bind -r H resize-pane -L 5 - bind -r J resize-pane -D 5 - bind -r K resize-pane -U 5 - bind -r L resize-pane -R 5 - - # ── Status bar ── - set -g status-position top - set -g renumber-windows on - - # ── Copy mode vim bindings ── - bind -T copy-mode-vi v send-keys -X begin-selection - bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel - ''; - }; -} diff --git a/home/shell/tools.nix b/home/shell/tools.nix index ad9e46c..bed57b8 100644 --- a/home/shell/tools.nix +++ b/home/shell/tools.nix @@ -86,6 +86,12 @@ }; }; + # ── Zellij (terminal multiplexer) ──────────────────── + programs.zellij = { + enable = true; + enableFishIntegration = true; + }; + # ── Ripgrep / FD ──────────────────────────────────── home.packages = with pkgs; [ ripgrep