You are not logged in.

#1 2009-10-31 17:42:13

lastchancetosee
Member
From: Berlin
Registered: 2009-02-19
Posts: 131

[solved] URxvt in Openbox: Set WM_WINDOW_ROLE

Hi, I'd like to do what it says in the title: Set custom window-roles for URxvt (like e.g. Terminal can do via command line options).

Background of the question is this:
I'm using Openbox and I want to start 2 Terminals on Desktop 4 on startup (via autostart.sh), but still have additional terminals I might start appear on the current desktop. I did this by setting the WM_WINDOW_ROLE property of the startup-terminals to 'desk4' and instruct Openbox to start Terminals with that role on Desktop 4.

Unfortunately URxvt has no such option.

So, any ideas on how to define the window role or achieve the above by other means?

Last edited by lastchancetosee (2009-11-01 00:29:53)


My ship don't crash! She crashes, you crashed her!

Offline

#2 2009-10-31 19:41:09

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: [solved] URxvt in Openbox: Set WM_WINDOW_ROLE

Is there any reason why you insist on using WM_WINDOW_ROLE? If not, you can use the name portion of the WM_CLASS property as well:

# urxvt -name desk4

This sets WM_CLASS as follows:

# xprop -id $WINDOWID | grep WM_CLASS
WM_CLASS(STRING) = "desk4", "URxvt"

and you can match it with openbox like this:

<application name="desk4" class="URxvt">
<desktop>4</desktop>
</application>

Offline

#3 2009-11-01 00:29:38

lastchancetosee
Member
From: Berlin
Registered: 2009-02-19
Posts: 131

Re: [solved] URxvt in Openbox: Set WM_WINDOW_ROLE

nope, no reason to use window role instead of name. Coming from xfce-terminal I was sort of looking at roles, not names. I must have missed the -name option, urxvt's manpages are huge.

Thanks.

____________________________

Not to others:
If you change the 'name' property of URxvt, make sure that all your configuration in .Xdefaults is

URxvt.<property>

and not

urxvt.<property>

or otherwise your renamed terminals wont use those settings.
Alternatively you can define entirely different properties for the newly-named terminal with

<newname>.<property>

Last edited by lastchancetosee (2009-11-01 09:21:17)


My ship don't crash! She crashes, you crashed her!

Offline

#4 2009-12-28 19:22:35

nblock
Member
From: Austria
Registered: 2008-08-06
Posts: 123
Website

Re: [solved] URxvt in Openbox: Set WM_WINDOW_ROLE

lastchancetosee wrote:

Not to others:
If you change the 'name' property of URxvt, make sure that all your configuration in .Xdefaults is

URxvt.<property>

and not

urxvt.<property>

or otherwise your renamed terminals wont use those settings.
Alternatively you can define entirely different properties for the newly-named terminal with

<newname>.<property>

thank you so much for this tip! I searched a few hours to fix this problem in urxvt.

Offline

Board footer

Powered by FluxBB