feat: 用 zellij 替换 tmux 作为终端复用器
This commit is contained in:
@@ -74,7 +74,6 @@ sudo nixos-rebuild switch --flake .#wsl
|
|||||||
│ │ └── git.nix
|
│ │ └── git.nix
|
||||||
│ └── shell/ # Shell 配置
|
│ └── shell/ # Shell 配置
|
||||||
│ ├── fish.nix # Fish shell
|
│ ├── fish.nix # Fish shell
|
||||||
│ ├── tmux.nix
|
|
||||||
│ ├── starship.nix # Prompt
|
│ ├── starship.nix # Prompt
|
||||||
│ └── tools.nix # fzf, atuin, zoxide 等
|
│ └── tools.nix # fzf, atuin, zoxide 等
|
||||||
├── lib/default.nix # 构建辅助函数
|
├── lib/default.nix # 构建辅助函数
|
||||||
|
|||||||
@@ -3,6 +3,5 @@
|
|||||||
./fish.nix
|
./fish.nix
|
||||||
./starship.nix
|
./starship.nix
|
||||||
./tools.nix
|
./tools.nix
|
||||||
./tmux.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -86,6 +86,12 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ── Zellij (terminal multiplexer) ────────────────────
|
||||||
|
programs.zellij = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
# ── Ripgrep / FD ────────────────────────────────────
|
# ── Ripgrep / FD ────────────────────────────────────
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
ripgrep
|
ripgrep
|
||||||
|
|||||||
Reference in New Issue
Block a user