From 3c737ac07ff6174c32cabc71d34e79988666b0f0 Mon Sep 17 00:00:00 2001 From: aaron Date: Fri, 12 Dec 2025 17:06:13 +0100 Subject: [PATCH] feat(tmux): nixify my tmux config --- hosts/neon/home.nix | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/hosts/neon/home.nix b/hosts/neon/home.nix index fe412e2..b121c01 100644 --- a/hosts/neon/home.nix +++ b/hosts/neon/home.nix @@ -28,6 +28,63 @@ plugins.web-devicons.enable = true; }; + # tmux config + programs.tmux = { + enable = true; + # Basic options + prefix = "C-a"; + keyMode = "vi"; + mouse = true; + # Terminal settings + terminal = "screen-256color"; + # Extra configuration + extraConfig = '' + # Status keys + set -g status-keys vi + # Status bar options + set -g status-interval 1 + set -g status on + set -g status-justify left + # Clock mode + setw -g clock-mode-colour cyan + # Colors + set -g status-bg black + set -g status-fg white + # Key bindings + # Reload configuration + bind r source-file ~/.config/tmux/tmux.conf + # Panel split and selection + unbind % + unbind '"' + bind v split-window -v + bind c split-window -h + bind i new-window + bind b previous-window + bind n next-window + # Move around panes with hjkl + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + # Resize panes + bind H resize-pane -L 5 + bind J resize-pane -D 5 + bind K resize-pane -U 5 + bind L resize-pane -R 5 + # Kill commands + bind q kill-window + bind Q kill-session + # Bars + set -g status-left "#[fg=black,bg=blue,bold] #S#[fg=blue,bg=black,nobold,noitalics,nounderscore]" + set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]" + set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H " + # Windows + set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]" + set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]" + set -g window-status-separator "" + ''; + }; + # user packages home.packages = with pkgs; [ discord