Assigning Windows to Workspaces

Asked by jabr

I usually group my visible windows by moving them into different workspaces. That helps boost my productivity. I have one problem though - I have to move windows to the same workspaces all the time they run. Is there any way of having a window (or a certain application) show up in an assigned workspace as opposed to the default one? Is there a separate app that does that, or am I missing something built into Ubuntu (Natty)?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu compiz Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:

This question was reopened

  • by jabr
Revision history for this message
jabr (abeisindaclub) said :
#1

Just to clarify with an example, say I want Banshee to run in Workspace 3 all the time as opposed to Workspace 1. Is there any way of doing this automatically each time Banshee starts other than the good old manual way?

Revision history for this message
Sam_ (and-sam) said :
#2

CCSM -> Window Management -> Place (plugin) -> Fixed window placement -> Windows with fixed viewport

add:
class=banshee 3 3
## Banshee opens at viewport 3
If banshee with first letter lower case doesn't work, try: class=Banshee

To find out window class open a terminal: ctrl+alt+t
Run:
xprop

Cursor turns into a cross, click on the application window, review terminal output, the second value usually is the correct one.
e.g.
WM_CLASS(STRING) = "ccsm", "Ccsm"

http://wiki.compiz.org/Plugins/Place

Revision history for this message
jabr (abeisindaclub) said :
#3

Worked like a charm, Sam_! Thank you so much! Any additional tips you may have are welcome :)

Revision history for this message
jabr (abeisindaclub) said :
#4

Actually, one more question. Sorry for being such a n00b. The issue I'm having now is that ccsm only checks window titles at startup. So, for instance, I can't match criteria for gmail because my browser (chrome) always starts with an Untitled - Google Chrome title. Any ideas? If I want to match a Gmail page loaded on my browser, how would I do this? Your compiz wiki lead was pretty helpful, but I haven't read anything that could help solve this. Thanks again btw. :)

To anyone who encountered my previous issue, the link above is awesome! :)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

You can use devilspie (available in the repos) and gdevilspie (available at google code) to configure it. It looks at the window title but I believe it can look at the process name too. See if it does what you like.

Revision history for this message
Sam_ (and-sam) said :
#6

Unity+compiz use global menu to display window title, e.g. Firefox in fullscreen mode displays the title of an open page on global menu.
How to enable it for Chrome is explained there.
http://www.h-online.com/open/news/item/Chrome-12-includes-support-for-Ubuntu-s-Unity-global-menu-1258038.html
http://www.omgubuntu.co.uk/2011/06/chrome-12-brings-unity-global-menu-support-and-heres-how-to-enable-it/

Revision history for this message
jabr (abeisindaclub) said :
#7

Apparently, the set_workspace option of devilspie doesn't work anymore. To verify, I did this.

( if
( begin
( contains ( window_name ) "Gmail" )
)
( begin
( maximize )
( set_workspace 1 )
)
)

It executes the maximize, but set_workspace fails. Any ideas? What's the difference between set_workspace and set_viewport?

Revision history for this message
jabr (abeisindaclub) said :
#8

An even easier solution that would make devilspie unnecessary is this: is there any way of making compiz's place windows plugin work on already open windows? For instance, is there a way that the plugin can match a window title that changed after the window first loaded? (fingers crossed)

Revision history for this message
Best Sam_ (and-sam) said :
#9

There is a cross where you can click which opens a new window where it has options in dropdown list such as window title, click on choose (or something) turns cursor into a cross which can be clicked now on an open window.
Or from terminal:
xprop WM_NAME | cut -d\" -f2

## Cursor turns into cross, then click on window title.

Revision history for this message
jabr (abeisindaclub) said :
#10

You guys are awesome, thank you so much! :)

Revision history for this message
jabr (abeisindaclub) said :
#11

Thanks Sam_, that solved my question.