Fix tmux config on mac

This commit is contained in:
Martin Pander
2026-03-02 19:40:10 +01:00
parent 2253f44399
commit ad7c88a221
3 changed files with 10 additions and 10 deletions

View File

@@ -38,6 +38,7 @@ in
home.packages = with pkgs; [
visidata
codespelunker
];
}
@@ -49,4 +50,4 @@ in
(lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.unstable.bubblewrap);
})
];
}
}

View File

@@ -14,7 +14,7 @@ in
shortcut = "a";
mouse = true;
keyMode = "vi";
escapeTime = 0;
escapeTime = 10;
terminal = "screen-256color";
tmuxp.enable = true;
extraConfig = ''
@@ -22,16 +22,15 @@ in
unbind S
bind S command-prompt "switch -t %1"
bind-key , command-prompt -p "rename-window:" "rename-window '%%'"
# Check if we are in vim
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-M-k if-shell "$is_vim" "send-keys C-M-k" "if -F \"#{pane_at_top}\" \"switch-client -p\" \"select-pane -U\""
bind-key -n C-M-j if-shell "$is_vim" "send-keys C-M-j" "if -F \"#{pane_at_bottom}\" \"switch-client -n\" \"select-pane -D\""
bind-key -n C-M-l if-shell "$is_vim" "send-keys C-M-l" "if -F \"#{pane_at_right}\" \"next-window\" \"select-pane -R\""
bind-key -n C-M-h if-shell "$is_vim" "send-keys C-M-h" "if -F \"#{pane_at_left}\" \"previous-window\" \"select-pane -L\""
bind-key -n C-M-h if-shell "$is_vim" { send-keys C-M-h } { if -F "#{pane_at_left}" "previous-window" "select-pane -L" }
bind-key -n C-M-j if-shell "$is_vim" { send-keys C-M-j } { if -F "#{pane_at_bottom}" "switch-client -n" "select-pane -D" }
bind-key -n C-M-k if-shell "$is_vim" { send-keys C-M-k } { if -F "#{pane_at_top}" "switch-client -p" "select-pane -U" }
bind-key -n C-M-l if-shell "$is_vim" { send-keys C-M-l } { if -F "#{pane_at_right}" "next-window" "select-pane -R" }
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

View File

@@ -19,7 +19,7 @@ vim.api.nvim_create_autocmd('FileType', {
-- pattern = 'go',
-- callback = function()
-- require('dap-python').setup()
-- require('dap-go').setup()
require('dap-go').setup()
-- vim.lsp.enable('ruff')
-- vim.lsp.config('ty')