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.

How can I move all the windows on one workspace to another workspace (all at once)? It doesn't seem to be possible from the gnome-panel applet (workspace switcher).

Separately, can start me on the way of writing this software (like taskbar shuffle for xp) for ubuntu? I'm guessing it's written in c/c++?

share|improve this question

2 Answers 2

One by one, you can right-click on the windows you wish to move and select "Move to Another Workspace". Or if you're a keyboard shortcut fan, Shift+ Ctrl + Alt + Left/Right Arrow.

Another keyboard shortcuts are a good option too.

(It seens you want to move ALL windows with a single command. I don't know a way to do it, just windows by window)

share|improve this answer
    
yeah i'm definitely looking to move them all at once, thanks though. –  user10580 Mar 16 '10 at 20:49

The command wmctrl can move individual windows between workspaces. You could write a script (in bash, perl, etc.) that parses its listing (wmctrl -l) and then moves all of the windows on one workspace to another. Its output is quite regular, e.g.

$ wmctrl -l
0x01a00019 -1 chef xfce4-panel
0x0300001a -1 chef x-nautilus-desktop
0x04e467f8  0 chef Edit - Super User - Google Chrome
0x05600003  2 chef swedish@chef: ~
0x056002ce  1 chef swedish@chef: ~
0x05603304  0 chef swedish@chef: ~

First column is the window ID (which you supply to other commands); second column is the 0-based workspace number.

wmctrl is available via the eponymous ubuntu package.

You could even write a wrapper script that takes a direction (up, down, left, right) and moves all windows from the current workspace to the one in that direction, and then bind it to something like Win-Shift-{arrow}.

share|improve this answer

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.