refactor: consolidate tmux config into home-manager 🎨

Remove system-level tmux.nix; home.nix is now the single source.
Port resize-pane shortcuts (H/J/K/L) from the old config.
This commit is contained in:
DannyDannyDanny 2026-03-30 18:12:41 +02:00
parent e997a83c93
commit ee4c2db93f
3 changed files with 6 additions and 58 deletions

View file

@ -35,7 +35,6 @@
nixos-wsl.nixosModules.default nixos-wsl.nixosModules.default
vscode-server.nixosModules.default vscode-server.nixosModules.default
./hosts/wsl.nix ./hosts/wsl.nix
./tmux.nix
./fish.nix ./fish.nix
# Home Manager on WSL # Home Manager on WSL

View file

@ -43,6 +43,12 @@
bind -r C-h select-window -t :- bind -r C-h select-window -t :-
bind -r C-l select-window -t :+ bind -r C-l select-window -t :+
# Resize pane shortcuts
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
# split with dash and vbar # split with dash and vbar
bind | split-window -h -c "#{pane_current_path}" bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}"

View file

@ -1,57 +0,0 @@
{ config, pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;
escapeTime = 20;
keyMode = "vi";
historyLimit = 100000;
baseIndex = 1;
extraConfig = ''
# remap prefix from ^+B to alt-f
unbind C-b
set -g prefix M-f
bind M-f send-prefix
# nvim 'checkhealth' advice
set-option -g focus-events on
set-option -sa terminal-overrides ',xterm-256color:RGB'
set-option -g default-terminal "screen-256color"
# enable mouse support for switching panes/windows
set -g mouse on
# pane movement shortcuts
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# window selection
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Resize pane shortcuts
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
# split with dash and vbar
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# server-tmux only:
# fix ssh agent when tmux is detached
# setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
'';
plugins = [
# pkgs.tmuxPlugins.tmux-powerline # status bar
pkgs.tmuxPlugins.catppuccin
pkgs.tmuxPlugins.tmux-fzf # search tmux commands (prefix + F)
pkgs.tmuxPlugins.extrakto # fuzzyfind text history (prefix + tab)
];
};
}