mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Add Alt+Shift+Arrow keybindings for swapping tmux windows
This commit is contained in:
@@ -43,6 +43,8 @@ bind -n M-9 select-window -t 9
|
|||||||
|
|
||||||
bind -n M-Left select-window -t -1
|
bind -n M-Left select-window -t -1
|
||||||
bind -n M-Right select-window -t +1
|
bind -n M-Right select-window -t +1
|
||||||
|
bind -n M-S-Left swap-window -t -1 \; select-window -t -1
|
||||||
|
bind -n M-S-Right swap-window -t +1 \; select-window -t +1
|
||||||
|
|
||||||
# Session controls
|
# Session controls
|
||||||
bind R command-prompt -I "#S" "rename-session -- '%%'"
|
bind R command-prompt -I "#S" "rename-session -- '%%'"
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
echo "Add Alt+Shift+Arrow keybindings for swapping tmux windows"
|
||||||
|
|
||||||
|
TMUX_CONF=~/.config/tmux/tmux.conf
|
||||||
|
|
||||||
|
if [[ -f $TMUX_CONF ]]; then
|
||||||
|
if ! grep -q "bind -n M-S-Left swap-window" "$TMUX_CONF"; then
|
||||||
|
sed -i '/bind -n M-Right select-window -t +1/a\
|
||||||
|
bind -n M-S-Left swap-window -t -1 \\; select-window -t -1\
|
||||||
|
bind -n M-S-Right swap-window -t +1 \\; select-window -t +1' "$TMUX_CONF"
|
||||||
|
fi
|
||||||
|
|
||||||
|
omarchy-restart-tmux
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user