From ce5454ff7ac521c7f8849b38a539a50218e89fd6 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Thu, 5 Dec 2024 13:32:44 -0600 Subject: [PATCH] tmux: handful of tweaks --- home/modules/tui/tmux.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/home/modules/tui/tmux.nix b/home/modules/tui/tmux.nix index 4b8989b..08cd9ec 100644 --- a/home/modules/tui/tmux.nix +++ b/home/modules/tui/tmux.nix @@ -1,13 +1,18 @@ -{ pkgs, lib, ... }: { +{ pkgs, ... }: { programs.tmux = { enable = true; + aggressiveResize = true; baseIndex = 1; clock24 = true; + customPaneNavigationAndResize = true; escapeTime = 50; + focusEvents = true; historyLimit = 100000; keyMode = "vi"; mouse = true; - plugins = with pkgs.tmuxPlugins; [ ]; + plugins = with pkgs.tmuxPlugins; [ + gruvbox + ]; extraConfig = '' # new panes inherit current working directory bind '%' split-window -h -c '#{pane_current_path}' @@ -34,6 +39,10 @@ bind -n M-j previous-window # alt+j bind -n M-k next-window # alt+k + # auto window rename + set-option -g automatic-rename + set-option -g automatic-rename-format '#{pane_current_command}' + # display up to 20 chars of session name set-option -g status-left-length 20 @@ -69,5 +78,13 @@ set-option -s set-clipboard on ''; }; + + home.shellAliases = { + tm = "tmux"; + tms = "tmux new -s"; + tml = "tmux list-sessions"; + tma = "tmux attach -t"; + tmk = "tmux kill-session -t"; + }; }