diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index d9fdc25..ff7dc6f 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -169,14 +169,15 @@ bind -r P swap-window -d -t :-1 # Reorder windows by dragging them in the status line. bind -n MouseDrag1Status swap-window -d -t= +# Move a window to the first or very last position # TODO: do nothing on drags that don't start on a window name # NOTE: mouse_{x,y} were not set in status line before 3.3 if -F "#{>=:#{version},3.3}" { bind -n MouseDragEnd1StatusDefault { if -F "#{e|>|f|0:#{mouse_x},#{e|/|f:#{window_width},2}}" { - run-shell "tmux move-window -at #{last_window_index}" + move-window -at :$ } { - move-window -t0 + move-window -bt :^ } } }