From c471f6b14fa9555fc8156367e69e306dc941dbbf Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Wed, 16 Aug 2023 09:10:45 -0500 Subject: [PATCH] tmux PWD behaviors - new panes open in the current working directory - new windows open in the homedir --- home/features/cli/tmux.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home/features/cli/tmux.nix b/home/features/cli/tmux.nix index 79cb3e4..7b09636 100644 --- a/home/features/cli/tmux.nix +++ b/home/features/cli/tmux.nix @@ -9,6 +9,10 @@ mouse = true; plugins = with pkgs.tmuxPlugins; [ ]; extraConfig = '' + # new panes inherit current working directory + bind '%' split-window -h -c '#{pane_current_path}' + bind '"' split-window -v -c '#{pane_current_path}' + # navigating panes with Ctrl+{hjkl} bind -n C-h select-pane -L bind -n C-j select-pane -D @@ -26,7 +30,7 @@ unbind n unbind w bind n command-prompt "rename-window '%%'" - bind w new-window -c "#{pane_current_path}" + bind w new-window bind -n M-j previous-window # alt+j bind -n M-k next-window # alt+k