Move current window to the left by one position
windows
// what it does
With `-s` defaulting to the current window, this swaps it with `-t -1` — the previous window in the window list — shifting the current window one slot toward the low end. tmux's default prefix + `<` menu already offers Swap Left / Swap Right that run exactly this. Focus quirk: without `-d` the current-window pointer stays on the old index, so after the swap you're viewing the neighbor that moved into your slot; add `-d` to follow the window you moved to its new index.
// tmux command
: swap-window -t -1// gotcha
`-1` means the previous window in the window list, so if there's a gap it swaps with the next-lower existing window, not literally index minus one. It swaps rather than shifts, so the neighbor takes your old slot.