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"; + }; }