From 241b50501b9515ad46c7489fe5c55b539be64fce Mon Sep 17 00:00:00 2001 From: Ben Kyd Date: Wed, 11 Mar 2026 16:57:40 +0000 Subject: [PATCH] Window ordering --- home/benk/.tmux.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/home/benk/.tmux.conf b/home/benk/.tmux.conf index 3daec08..7d55d24 100644 --- a/home/benk/.tmux.conf +++ b/home/benk/.tmux.conf @@ -4,10 +4,9 @@ set -ga terminal-overrides ",xterm*:Tc" set -sg escape-time 0 set -g history-limit 50000 -# Detect fish — Homebrew on macOS, system on Linux -if-shell "test -x /opt/homebrew/bin/fish" \ - "set-option -g default-shell /opt/homebrew/bin/fish; set-option -g default-command /opt/homebrew/bin/fish" \ - "set-option -g default-shell /usr/bin/fish; set-option -g default-command /usr/bin/fish" +# Set Fish as default shell (Apple Silicon path) +set-option -g default-shell /opt/homebrew/bin/fish +set-option -g default-command /opt/homebrew/bin/fish unbind C-Enter @@ -44,10 +43,11 @@ unbind '"' unbind % # --- i3-style pane moving (prefix + H/J/K/L swaps panes) --- -bind H swap-pane -s '{left-of}' -bind J swap-pane -s '{down-of}' -bind K swap-pane -s '{up-of}' -bind L swap-pane -s '{right-of}' +# Try directional swap first; if no pane in that direction, break out and rejoin +bind H run-shell 'tmux swap-pane -s "{left-of}" 2>/dev/null; true' +bind J run-shell 'tmux swap-pane -s "{down-of}" 2>/dev/null; true' +bind K run-shell 'tmux swap-pane -s "{up-of}" 2>/dev/null; true' +bind L run-shell 'tmux swap-pane -s "{right-of}" 2>/dev/null; true' # --- Window moving (prefix + < / > shifts window position) --- bind -r < swap-window -t -1\; select-window -t -1