You are not logged in.

#1 2011-09-20 19:28:06

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[Openbox] Maximised windows [solved]

Hi guys,

I have a couple of applications which I want to have maximised main windows, such as Inkscape.

However I do not want the dialog windows of that application to be maximised as well.

How can I define that in Openbox?

My rc.xml which is not supporting this right now.

<application class="Chrome">
    <maximized>yes</maximized>
  </application>
  <application class="Zathura">
    <maximized>yes</maximized>
  </application>
  <application class="Gvim">
    <maximized>yes</maximized>
  </application>
  <application class="Inkscape">
    <maximized>yes</maximized>
  </application>
  <application type="dialog">
    <maximized>no</maximized>
  </application>
  <application type="normal">
    <maximized>no</maximized>
  </application>

Regards

Last edited by orschiro (2011-09-22 06:52:07)

Offline

#2 2011-09-21 00:28:29

hellbuster
Member
From: Chile
Registered: 2010-05-18
Posts: 28
Website

Re: [Openbox] Maximised windows [solved]

I'm using devilspie to do that. I have the .devilspie/inkscape.ds file with the following:

(if (matches (window_name) "[\w\s\.]* - Inkscape") (maximize))

But I'm interested in a solution that only uses the rc.xml file.

Offline

#3 2011-09-21 06:24:43

jfb3
Member
Registered: 2011-08-20
Posts: 68

Re: [Openbox] Maximised windows [solved]

Have you read this page?

The right combination of class and title ought to work.

Offline

#4 2011-09-21 06:40:51

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [Openbox] Maximised windows [solved]

But wouldn't that mean that I have to define a non-maximised rule for every single window of an application which I do not want to be maximised?

As for example for Inkscape, there is not only one dialog window that shouldn't be maximised.

Regards

Offline

#5 2011-09-21 06:42:57

jfb3
Member
Registered: 2011-08-20
Posts: 68

Re: [Openbox] Maximised windows [solved]

I think you should be able to define a rule to only maximize the main window.  Thus leaving any others unaffected.

Offline

#6 2011-09-21 07:14:27

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [Openbox] Maximised windows [solved]

I'm not sure about that. How should I address the main window which title is changing after I have saved the session and renamed it so that it isn't named 'New document 1 - Inkscape' anymore?

_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "New document 1 - Inkscape"
_OB_APP_CLASS(UTF8_STRING) = "Inkscape"
_OB_APP_NAME(UTF8_STRING) = "inkscape"
_OB_APP_ROLE(UTF8_STRING) = 
_NET_WM_VISIBLE_ICON_NAME(UTF8_STRING) = "New document 1 - Inkscape"
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "New document 1 - Inkscape"

Last edited by orschiro (2011-09-21 07:14:46)

Offline

#7 2011-09-21 13:55:58

jfb3
Member
Registered: 2011-08-20
Posts: 68

Re: [Openbox] Maximised windows [solved]

I'd think that the class would be the same but the title could be matched with wildcards {* - Inkscape}  (or something like that).

Offline

#8 2011-09-21 19:02:07

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [Openbox] Maximised windows [solved]

I suppose you mean a configuration like that.

  <application class="Inkscape">
    <maximized>no</maximized>
  </application>
  <application title="* - Inkscape">
    <maximized>yes</maximized>
  </application>

Again this does opens all Inkscape windows maximised.

The output of obxprop for one of the other windows which shouldn't be maximised:

_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Export Bitmap (Shift+Ctrl+E)"
_OB_APP_CLASS(UTF8_STRING) = "Inkscape"
_OB_APP_NAME(UTF8_STRING) = "inkscape"
_OB_APP_ROLE(UTF8_STRING) = 

Regards

Offline

#9 2011-09-21 19:22:15

jfb3
Member
Registered: 2011-08-20
Posts: 68

Re: [Openbox] Maximised windows [solved]

What does obxprop report for the other windows you don't want maximized?

Offline

#10 2011-09-21 19:54:51

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [Openbox] Maximised windows [solved]

I mentioned it already in the last post.

Again, this window should not be maximised:

_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Export Bitmap (Shift+Ctrl+E)"
_OB_APP_CLASS(UTF8_STRING) = "Inkscape"
_OB_APP_NAME(UTF8_STRING) = "inkscape"
_OB_APP_ROLE(UTF8_STRING) = 

This window, the main window, should:

_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "New document 1 - Inkscape"
_OB_APP_CLASS(UTF8_STRING) = "Inkscape"
_OB_APP_NAME(UTF8_STRING) = "inkscape"
_OB_APP_ROLE(UTF8_STRING) = 
_NET_WM_VISIBLE_ICON_NAME(UTF8_STRING) = "New document 1 - Inkscape"
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "New document 1 - Inkscape"

Offline

#11 2011-09-22 02:58:58

jfb3
Member
Registered: 2011-08-20
Posts: 68

Re: [Openbox] Maximised windows [solved]

I need to install an app with similar window naming to test...

Last edited by jfb3 (2011-09-22 02:59:08)

Offline

#12 2011-09-22 04:52:01

Larsson
Member
From: Sweden
Registered: 2010-03-22
Posts: 157

Re: [Openbox] Maximised windows [solved]

orschiro wrote:

I suppose you mean a configuration like that.

  <application class="Inkscape">
    <maximized>no</maximized>
  </application>
  <application title="* - Inkscape">
    <maximized>yes</maximized>

I added that code to my rc.xml in the application section (the one not commented) and it worked fine. The main window started maximized but the export bitmap window remainded in window mode. There's probably something wrong in your ~/.config/openbox/rc.xml


"If the person you are talking to doesn't appear to be listening, be patient. It may simply be that he has a small piece of fluff in his ear." - A.A. Milne (Winnie-the-Pooh)

Offline

#13 2011-09-22 06:51:49

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [Openbox] Maximised windows [solved]

Indeed you're right. Openbox still opened the export bitmap window maximised even though the rule should not force it to. I changed it to my preferred old size and since then it opens with that size.

Regards

Offline

Board footer

Powered by FluxBB