[openbox] default window size for a specific application

tomislav_maric@gmx.com tomislav.maric at gmx.com
Fri Mar 5 12:09:15 EST 2010


Thanks for the advice! I've managed to find the problem: it was within inkscape itself. There is an option for it's window in the 

File - Inkscape Preferences - Windows

to set the use of the last opened window size. I'm kind of an apprentice on Linux (2 years of Ubuntu), but still I get the feeling that if X server manages windows to their core, the application shouldn't mess with these settings: then the configuration would be in one neat place and no additional daemons would be necessary, as the ones you've suggested. 

I'll look up the script and the devilspie and the .sh in case I need it for another app. Thank you both very much! 

Best, 
Tomislav
----- Original Message -----
From: openbox-request at icculus.org
Sent: 03/05/10 06:00 PM
To: openbox at icculus.org
Subject: openbox Digest, Vol 13, Issue 5

Send openbox mailing list submissions to
openbox at icculus.org

To subscribe or unsubscribe via the World Wide Web, visit
http://icculus.org/mailman/listinfo/openbox
or, via email, send a message with subject or body 'help' to
openbox-request at icculus.org

You can reach the person managing the list at
openbox-owner at icculus.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of openbox digest..."


Today's Topics:

 1. default window size for a specific application
 (tomislav_maric at gmx.com)
 2. Re: default window size for a specific application (Johan Vromans)
 3. Re: default window size for a specific application
 (Anthony Thyssen)


----------------------------------------------------------------------

Message: 1
Date: Thu, 04 Mar 2010 18:34:25 +0100
From: "tomislav_maric at gmx.com" <tomislav.maric at gmx.com>
Subject: [openbox] default window size for a specific application
To: openbox at icculus.org
Message-ID: <20100304173729.134300 at gmx.com>
Content-Type: text/plain; charset="us-ascii"

Hi everyone, 

I'm trying to configure the inkscape application to start with a different window size from the default one: the default one is too small. I've defined the proper "class" and "name" for the app in the rc.conf and played around with the options: everything works fine. Big thanks to the developers of this fast and beautiful software. :) 

I've tried to use the settings:

inkscape*geometry: 800x600+0+0

in the ~/.Xdefaults file because I didn't find the window size option for a specific app in the rc.conf. Is there such a parameter? The applications seem to ignore the .Xdefaults (firefox and inkscape) and giving them "-geometry" option when calling them from the console does nothing (inkscape= warnings, firefox= plain ignoring). 

Inkscape is really small when it starts and that's why I'm trying to do this... I would be grateful for any advice .... 

Tomislav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20100304/350a1bb5/attachment.html>

------------------------------

Message: 2
Date: 04 Mar 2010 20:57:33 +0100
From: Johan Vromans <jvromans at squirrel.nl>
Subject: Re: [openbox] default window size for a specific application
To: openbox at icculus.org
Message-ID: <m2sk8fkggi.fsf at phoenix.squirrel.nl>
Content-Type: text/plain; charset=us-ascii

"tomislav_maric at gmx.com" <tomislav.maric at gmx.com> writes:

> The applications seem to ignore the .Xdefaults (firefox and
> inkscape) and giving them "-geometry" option when calling them from
> the console does nothing (inkscape= warnings, firefox= plain
> ignoring).

Yes. For some unknown reasons modern GTK based apps do not listen to
these reasonable commands...

You may wish to take a look at devilspie.

-- Johan


------------------------------

Message: 3
Date: Fri, 5 Mar 2010 10:08:15 +1000
From: Anthony Thyssen <A.Thyssen at griffith.edu.au>
Subject: Re: [openbox] default window size for a specific application
To: openbox at icculus.org
Message-ID: <20100305100815.37ea144a at wraith>
Content-Type: text/plain; charset=US-ASCII

On 04 Mar 2010 20:57:33 +0100
Johan Vromans <jvromans at squirrel.nl> wrote:

| "tomislav_maric at gmx.com" <tomislav.maric at gmx.com> writes:
| 
| > The applications seem to ignore the .Xdefaults (firefox and
| > inkscape) and giving them "-geometry" option when calling them from
| > the console does nothing (inkscape= warnings, firefox= plain
| > ignoring).
| 
| Yes. For some unknown reasons modern GTK based apps do not listen to
| these reasonable commands...
| 
| You may wish to take a look at devilspie.
| 
The other way is to watch for the winodw to open then resize it using a
window manager helper program. I do this myself to reset my firefox
window on startup.

Devilspie is one such program but it watches for new windows FOREVER!
that is every time a new winodw for a a watched application openes it
does the deed, not just for the first one.

I did not what this for my own firefox resize. I only wanted the first
specific window opened a specific size. I also wanted it iconified
automatically which GTK application also do not provide options for.

My solution was to first have an application script called "xwin_find"

Download from 
 http://hobbit.ict.griffith.edu.au/~anthony/software/xwin_find.sh

It is a shell script that for a given period of time waits for a
given window to appear, and return its windowID so I can then
resize/iconify it.

Here is what I do for firefox from by 'extra clients' session script

 ( firefox -P default -geometry 820x1000+530+70 & ) &
 if id=`xwin_find 60 "Anthony .* Mozilla Firefox"`; then
 echo "Main firefox window found (id=$id)"
 # size, position, and iconify
 xwit -resize 820 1000 -move 530 70 -iconify -id $id
 fi

The first line starts it.
the if waits for a window to appear with tne title specified
and notes its WindowID.
Then the 'xwit' program resizes and iconify's it.

you could alos use wmctrl instead of xwit



 Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
 --------------------------------------------------------------------------
 If we forget to respect our Great Earth Mother,
 She will withhold Her blessings, and no longer provide for us.
 -- Jean M. Auel "The Mammoth Hunters"
 --------------------------------------------------------------------------
 Anthony's Castle http://hobbit.ict.griffith.edu.au/~anthony/


------------------------------

_______________________________________________
openbox mailing list
openbox at icculus.org
http://icculus.org/mailman/listinfo/openbox


End of openbox Digest, Vol 13, Issue 5
**************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20100305/3cb7e880/attachment.htm>


More information about the openbox mailing list