Re: feature request

"Jørn V. Christensen" <[email protected]> Tue, 13 Sep 2005 23:08:51 +0200
Newsgroups gmane.compw.window-managers.windowmaker.user
Organization Mettle.dk
Message-ID <[email protected]>
Jens Rohler wrote:
> Hi,
> 
> with wdread/wdwrite it is possible to read/write the option StartWorkspace. 
> This option controls on which Workspace an application is started. 
> 
> You can (temporarily) set the StartWorkspace option for Gimp to 2 if you write 
> a script that contains the following commands:
> 1. Save the old settings for Gimp: 
>     OLD=`wdread WMWindowAttributes Gimp`
> 2. Set the Workspace for Gimp to 2 (2 is the name of the Workspace):
>     wdwrite WMWindowAttributes Gimp '{StartWorkspace=2;}'
> 3. execute gimp
>     gimp
> 4. Then restore the old settings for Gimp with 
>      wdwrite WMWindowAttributes Gimp "$OLD"
> Execute the last command, when starting gimp is finished (maybe a 
> sleep-command between steps 3 and 4).

Hi and thanks for the tip, although it does not quite do the job...

Besides that I had trouble getting it to work every time (dunno why), 
there are some problems:

Programs does not have the same class definition as their executable 
names. E.g. gimp is called Gimp (could be adjusted with a perl script), 
psi is called main.psi and thunderbird is called
Gecko.Mozilla-thunderbird-bin.

So you see, you have to code your script for every application you ever 
want to start temporarily on another desktop.

Another problem is, that if you do not have any settings for an 
application, wdread returns an empty string. That is ok, but when you 
have to "set that empty string" (in english: delete settings you made) 
like you set previous existing settings, you cannot do that. Of course 
you cut alter the file your self - but that would be an ugly thing to do.

Which leads to the last (although not best) argument: Its ugly! Reading 
settings, waiting long enough time so you _think_ the app has fully 
started, and then writing the old settings back... Its a fix you apply 
when _nothing_ else can be done.

Best regards
~Jørn

Ps: In the above, I may sound negative and grumpy - I'm not! (At least 
that is what I tell myself :D) ACtually, I'm glad that some else thinks 
this topic has relevanse enough to discuss it :)
_______________________________________________
INFO: https://windowmaker.org/lists/listinfo/wm-user
ARCHIVE: https://windowmaker.org/lists/archive/wm-user/
FAQ: http://windowmaker.org/faq.html