17

I'd like to bind Shift + and Shift + to move my current screen left/right in the ordering of screens.

How can this be done?

These are the versions I'm using:

$ byobu -v
byobu version 2.68
Screen version 4.00.03jw4 (FAU) 2-May-06
Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
bukzor
  • 2,094
  • 2
  • 16
  • 21

1 Answers1

24

You can easily bind actions to shift-left and shift-right, using:

bindkey "^[[1;2D" prev
bindkey "^[[1;2C" next

Note that Byobu 5.12 uses these bindings by default for shift-left and shift-right.

And you can easily move a window from one window number to another by pressing:

ctrl-a :number [SOME_NUMBER]

However, GNU Screen does not support SOME_NUMBER to be a relative value, like +1 or -1. Rather, it must be an absolute window number, like "8" or "2".

Byobu also supports tmux as a backend, in addition to screen. Tmux does have support for this feature, and it can be accomplished by highlighting the window you want to move, and pressing Ctrl-Shift-F3 to move it left, and Ctrl-Shift-F4 to move it right.

Dustin Kirkland
  • 8,411
  • 3
  • 24
  • 23
  • 1
    Also with tmux, `ctrl-a : swap-window -t -1` to move one to the left, `+1` to move one to the right. See [this answer](https://superuser.com/a/552493/101005) for more info. – drevicko Aug 03 '20 at 03:21