tmux: Support dragging into status bar

Additionally to dragging a window onto the target destination, add
support to drag it further than the outermost windows.
This commit is contained in:
2024-02-28 13:09:38 +01:00
parent 6d60e14824
commit 1d00e201a7

View File

@@ -99,8 +99,13 @@ bind -n MouseDragEnd1Status {
setenv -u tmux_move_direction
}
# TODO: Move to beginning or end like in MouseDragEnd1Status
# bind -n MouseDragEnd1StatusDefault display-message "#{e|>|f|0:#{mouse_x},#{e|/|f:213,2}}"
# TODO: do nothing on drags that don't start on a window name
bind -n MouseDragEnd1StatusDefault \
if -F "#{e|>|f|0:#{mouse_x},#{e|/|f:#{window_width},2}}" {
move-window -t #{last_window_index} -a
} {
move-window -t0
}
# Repeatable window-movement bindings
bind -r \{ swap-pane -U