Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 20 windows open in my screen session, and I would like to reorder the right-most window 20 to say, just between positions 9 and 10 like this:

1 2 3 4 5 6 7 8 9      10 11 12 13 14 15 16 17 18 19 20
                                                   ...V
                                        ............
                      ...................
                    ...
                    V
1 2 3 4 5 6 7 8 9  20  10 11 12 13 14 15 16 17 18 19

How can I do that in a single or few command/s?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

I don't know how to reorder the window number using mouse. But in git version, window number can increase or decrease relative amount.

number [[+|-]n]

And in the windowlist, you can swap the window number using ,(previous) or .(next).

In your example, the following procedure would satisfy your wishes.

  1. select the window you want to move(select 20)
  2. switch into windowlist(windowlist)
  3. type , key 10 times
  4. (exit windowlist)
share|improve this answer
    
does this work for an existing screen session that I reconnected with the git version using 'screen -RD'? –  130490868091234 Feb 1 '12 at 6:20
    
I think probably not. This feature require newer version both FRONTEND screen and BACKEND screen. –  yoshikaw Feb 1 '12 at 7:20
    
This is what I thought. I'll start a new one with the git version once the one I have running needs to be closed... Thanks! –  130490868091234 Feb 1 '12 at 12:58
add comment

The best I know of, is to re-number all your windows, like this:

C-a :number X

where C = ctrl, and X is the number your want for this window. In your case, this means that you need to move 20 -> 10, and 10 -> 20. Use a more complicated approach if you prefer.

From the man page:

  number [n]

   Change  the  current  windows  number. If the given number n is already
   used by another window, both windows  exchange  their  numbers.  If  no
   argument  is specified, the current window number (and title) is shown.
share|improve this answer
add comment

There is no such option for screen.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.