Re: [xmonad] Moving windows to a workspace based on their title / console applications in terminal emulators

Hey !
Indeed there is a bug.
I did a simple test :
1)with urxvt
urxvt -name icq
--> xprop says WM_CLASS(STRING) = "icq", "URxvt"
--> xmonad puts the window matching URxvt pattern , not icq
2)with xterm
xterm -class icq
--> xprop says WM_CLASS(STRING) = "xterm", "icq"
--> the window is placed in my icq workspace. Again xmonad seems to take only
the second class string to match
So for now you can probably use xterm...
Lobzang.
Quoting Bastian Schnitzler
Hi! I did:
[ className =? "Icq" --> doF (W.shift "2") ], [ className =? "irssiterm" --> doF (W.shift "2") ], [ className =? "muttterm" --> doF (W.shift "2") ],
and still urxvt -name Icq -title Icq stays on the same workspace, same for other classnames. Does it work for you?
Bastian
On 09:06 Thu 31 Jan , lobzang@free.fr wrote:
Hi,
urxvt -name icq -e centerim urxvt -name mail -e mutt
should do the trick ( assuming you update your xmonad window rules : , className =? "icq" --> doF (W.shift "icq" ) , className =? "mail" --> doF (W.shift "mail" )
Lobzang
Quoting Bastian Schnitzler
: Hi all! For many purposes I am using console applications, like centerim, irssi or mutt. Now when I start xmonad, I'd like to open a bunch of applications (Can I do this via .xinitrc), like firefox, mutt, etc. These should then be moved to a workspace, based on the application running. So when I start an rxvt-Terminal with mutt, I want this to be moved to workspace 3, how can I do this? On top of that I can't figure out how to move gimp to a special workspace. I have setten it to float, but I tried the class names, gimp, Gimp, gimp-2.2 etc. but it won't go to the workspace I want, when I start it. Anyway what is this class name to identify a window? Is it the process name? Thanks in advance, Bastian Schnitzler

On Fri, Feb 01, 2008 at 09:29:08AM +0100, lobzang@free.fr wrote:
Hey !
Indeed there is a bug. I did a simple test :
1)with urxvt urxvt -name icq --> xprop says WM_CLASS(STRING) = "icq", "URxvt" --> xmonad puts the window matching URxvt pattern , not icq
2)with xterm xterm -class icq --> xprop says WM_CLASS(STRING) = "xterm", "icq" --> the window is placed in my icq workspace. Again xmonad seems to take only the second class string to match
So for now you can probably use xterm...
Lobzang.
You're observing the difference between class name and resource name. Apparently 'xterm -class' sets the class name (called className in ManageHook), but 'urxvt -name' sets resource name (called resource in ManageHook).

Hi!
You're observing the difference between class name and resource name. Apparently 'xterm -class' sets the class name (called className in ManageHook), but 'urxvt -name' sets resource name (called resource in ManageHook).
This doesn't help, for me neither xterm -class icq or urxvt -name icq works with my config, here an excerpt: [ className =? "xterm" --> doF (W.shift "2") ], [ className =? "XTerm" --> doF (W.shift "2") ], [ className =? "icq" --> doF (W.shift "2") ], [ resource =? "icq" --> doF (W.shift "2") ], [ className =? "muttterm" --> doF (W.shift "2") ], [ className =? "Googleearth-bin" --> doF (W.shift "5") ], [ className =? "maple" --> doF (W.shift "5") ], [className =? "xmaple" --> doF (W.shift "5") ], [ className =? "Gimp" --> doF (W.shift "5") ], [ className =? "gimp" --> doF (W.shift "5") ], [ className =? "amarokapp" --> doF (W.shift "6") ], [ className =? "mplayer" --> doF (W.shift "7") ], [ className =? "Kpdf" --> doF (W.shift "8") ], [ className =? "Firefox-bin" --> doF (W.shift "9") ] ] where myFloats = ["Gimp", "gimp-2.2"] Funny that neither xterm, nor urxvt nor urxvt -name icq nor xterm -class icq is moved to Workspace 2? The same thing goes for me with Gimp, maple, mplayer, and google earth; the only things that actually are moved, are Kpdf, Firefox-bin and amarokapp, what am I doing wrong? Bastian

Hy, try to check the className using "xprop". Dominik On Fri, Feb 01, 2008 at 09:37:56PM +0100, Bastian Schnitzler wrote:
Hi!
You're observing the difference between class name and resource name. Apparently 'xterm -class' sets the class name (called className in ManageHook), but 'urxvt -name' sets resource name (called resource in ManageHook).
This doesn't help, for me neither xterm -class icq or urxvt -name icq works with my config, here an excerpt:
[ className =? "xterm" --> doF (W.shift "2") ],
[ className =? "XTerm" --> doF (W.shift "2") ],
[ className =? "icq" --> doF (W.shift "2") ],
[ resource =? "icq" --> doF (W.shift "2") ],
[ className =? "muttterm" --> doF (W.shift "2") ],
[ className =? "Googleearth-bin" --> doF (W.shift "5") ],
[ className =? "maple" --> doF (W.shift "5") ], [className =? "xmaple" --> doF (W.shift "5") ],
[ className =? "Gimp" --> doF (W.shift "5") ], [ className =? "gimp" --> doF (W.shift "5") ],
[ className =? "amarokapp" --> doF (W.shift "6") ],
[ className =? "mplayer" --> doF (W.shift "7") ],
[ className =? "Kpdf" --> doF (W.shift "8") ],
[ className =? "Firefox-bin" --> doF (W.shift "9") ] ]
where myFloats = ["Gimp", "gimp-2.2"]
Funny that neither xterm, nor urxvt nor urxvt -name icq nor xterm -class icq is moved to Workspace 2? The same thing goes for me with Gimp, maple, mplayer, and google earth; the only things that actually are moved, are Kpdf, Firefox-bin and amarokapp, what am I doing wrong?
Bastian
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- Dominik Bruhn mailto: dominik@dbruhn.de

On 20:43 Fri 01 Feb , Dominik Bruhn wrote:
Hy, try to check the className using "xprop".
WM_CLASS(STRING) = "icq", "XTerm" WM_COMMAND(STRING) = { "xterm", "-name", "icq" } WM_CLASS(STRING) = "xterm", "XTerm" WM_COMMAND(STRING) = { "xterm" } WM_CLASS(STRING) = "icq", "URxvt" WM_COMMAND(STRING) = { "urxvt", "-name", "icq" } WM_CLASS(STRING) = "urxvt", "URxvt" WM_COMMAND(STRING) = { "urxvt" } Still doesn't work here Yours, Bastian
participants (4)
-
Bastian Schnitzler
-
Dominik Bruhn
-
lobzang@free.fr
-
Spencer Janssen