1

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++?

user10580
  • 281

2 Answers2

1

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}.

intuited
  • 3,481
0

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)

GmonC
  • 2,402