[xmonad] Re: Scratchpad should match on class not on title
Braden Shepherdson
Braden.Shepherdson at gmail.com
Sun Jun 22 14:44:36 EDT 2008
Brandon S. Allbery KF8NH wrote:
>
> On 2008 Jun 22, at 8:43, Dominik Bruhn wrote:
>
>> I tried to change this by using "-name" instead of "-title" as
>> parameter for the
>> terminal. This also adds a new WM_CLASS to the window named like the
>> parameter.
>> This Class doesnt change if a application changes the title so xmonad
>> could
>> match on this. I tried both urxvt and xterm, they both behave the same
>> way: if
>> you supply "-name scratchpad" on the comandline a new WM_CLASS named
>> "scratchpad" is added to the window.
>>
>> I tried to change it on my own by changing the commandline (this
>> worked without
>> a problem) and then exchange the "scratchpadQuery" with
>> scratchpadQuery = className =? "scratchpad"
>
> You are (as is common) being confused by the fact that WM_CLASS is an
> array, and the *second* element is "className". The first element
> (-name) is "resourceName". (This and the fact that the title is WM_NAME
> are easily the most confusing parts of working with X11.)
>
Brandon is right. I actually made this patch on request from a user on
#xmonad, because he was having this problem. I never pushed the patch
since I wasn't sure it would work for all terminals, and the -title
based solution had worked so far.
I've pushed this patch to the repository, a darcs pull should have it
matching on the resource name.
Braden Shepherdson
shepheb
More information about the xmonad
mailing list