Michael Großer <michael.gros...@gmx.de> writes:

> lee wrote:
>> Michael Großer <michael.gros...@gmx.de> writes:
>> 
>>> Michael Großer wrote:
>>>> Dan Espen wrote:
>>>>> lee <l...@yagibdah.de> writes:
>>>>> 
>>>>>> Hi,
>>>>>>
>>>>>> the subject pretty much says it:
>>>>>>
>>>>>> Can I somehow make it so that fvwm ignores particular windows when
>>>>>> figuring out where to place a new one?
>>>>> 
>>>>> Not that I know of.
>>>>> 
>>>>> What are you trying to do?
>>>> 
>>>> Without awaiting the answer about what is tried to do:
>>>> 
>>>> If no official way helps, there is always a dirty but "creative"
>>>> approach.
>>>> 
>>>> - Minimize the particular windows that you want to ignore
>>>> - Hide their icons
>>>> - Place your new window
>>>> - Unhide the hidden icons
>>>> - Reopen the minimized windows
>>>> 
>>>> The process would perhaps have an optical effect that is not so good
>>>> looking, but the "creative" approach could solve your problem if no other
>>>> expert delivers a better solution :-)
>>>
>>> Another idea:
>>>
>>> - Move the particular windows to a desktop that solely exists for that 
>>> purpose
>>> - Place your new window
>>> - Move the cleared away windows back to their original place
>> 
>> Thanks, these are good ideas :)
>> 
>> I haven't figured out how to use multiple desks, though.  I tried that
>> once and apparently got multiple desks just by naming some, but no way
>> to switch between them.
>
> In addition to what Dan Espen and Lucio Chiappetti wrote, I could
> dig out an old text from me where I described my 7-dimensional approach
> of working (how I work until today):
> https://www.mail-archive.com/fvwm@fvwm.org/msg02282.html

Interesting :)  It seems very confusing, though.  How do you remember
what is where?  I have a plain setup with just 6x6 pages and many times
have to flip between them to find the particular page I want to go to.
I would have to remember what is currently on which page, on which page
I currently am and how to get to the page I want to go to.  I don't
always remember that.

> Then, there is another nice tool apart from FVWM, with wich you can
> play around. Try these commands:
>
> # wmctrl -s 0
> # xterm -title sun
> # wmctrl -s 4
> # wmctrl -R sun
> # wmctrl -r sun -N moon
>
> Wmctrl is funny, but GotoDesk and GotoDeskAndPage are better, because they
> distinguish between viewports (pages) and desks.

Well, I have switching pages on Alt+Cursor (or AltGr, depending on what
keyboard I currently use).  I can also move mouse pointer over the edge
to switch pages.

But desks?  Perhaps I could put them on Alt+(some key on the numpad), or
make use of the ScrollLock key.  Hm.  It might be worth a try as it
could be easier to remember on what desk something is when each has like
2x2 pages only.

>> What I'm trying to do is achieving more reasonable window placement.  I
>> found that one small window can make it so that a larger window is not
>> placed the way I would consider reasonable.  I found that out by
>> manually moving the small window around to see what placement I would
>> get and concluded that if fvwm would ignore the small window when it
>> figures out the placement of the larger one, the larger window would be
>> placed well.  So I wondered if I could have fvwm ignore the small
>> window.
>> 
>> Now you suggest to move the small window out of the way automatically
>> rather than manually --- something I haven't thought of :)
>
> Can you describe in more detail, which kind of small window is interfering
> with what kind of larger window? What is your use case? If there is no
> technical approach to solve your wish generally, perhaps another creative
> idea could arise to solve your special use cases.

It's the pager window getting in the way of the placement of others
windows.  The pager is at the right bottom of the screen and stick,
usually covered by other windows which I actually use.

When I start seamonkey, seamonkey opens two windows, each half size of
the display.  I do that on an otherwise empty page, except for the
pager, and fvwm places one window at the left of the display and the
other in the middle so the the pager window is not covered up.  I want
each window of seamonkey placed at ether the left or the right so that
they are side by side and don't overlap each other but one of them
overlaps the pager window.

The placement does work fine when there is no pager window.  Basically,
for all windows, fvwm should ignore the pager window when figuring out
where to place a window.

> One creative idea could be that you place special windows by yourself
> like that:
> # xterm -geometry 100x20+0+0 -e "echo \"I'm always top left\";bash"
> # xterm -geometry 100x20 -e "echo \"I'm 100x20 and pick my own place\";bash"
>
> Some Linux/Unix programs take arguments like "-geometry", and if your
> small and large windows are software like xterm, nedit or the like,
> your issues were quickly solved just by giving them "-geometry" arguments
> to automatically place them in harmony with each other.

Seamonkey remembers its session and restores it when it's restarted,
which is exactly what I want.  That means it opens all other windows ---
that can be more than one other, depending on how many you had open
before --- by itself, and I don't know a way to make it place such
windows at a particular position.

As far as I could find out, it seems to remember the positions of its
windows relative to each other and restores them that way.  That means
when you start seamonkey on the "wrong" page, it will open windows off
screen.  To prevent that, I'm using !UsePPosition and
!UseTransientPPosition, which forces the windows to appear on the same
page seamonkey was started from.

In any case, I don't want to set pre-defined positions for windows in
general.  That becomes too tedious to do and to maintain, and I don't
need that.


My creative approach would be to allow setting a stacking priority for
windows, meaning that windows with a higher stacking priority are
allowed to overlap windows that have a lower stacking priority when the
alternative would be that a window would overlap another window that has
the same stacking priority.  Each window would have a default stacking
priority.

That would probably need to be implemented into fvwm itself as it is
fvwm itself deciding where to place windows.  I could give it a try if I
can find the time (and you see how long it took me to finally get around
to post an answer), but I don't know the code at all yet, and the code
that figures out where to place windows is probably anything but trivial
(at least when you suck at math, which I do).

>> Is there some way to make it so that a function which moves the small
>> window out of the way is always called when fvwm is about to figure out
>> where to place a window?
>
> Probably, there is a way, but it is hidden. Thomas Adam made a nice man
> page especially for me years ago. I don't know, why that man page was
> never published.
>
> Look at the attachments of this e-mail message, and you will find two
> documents that officially only exist on my very own computer systems
> (at home and at work).

Thanks!

Events ... Well, yesterday I found that I get the desired placement of
seamonkeys windows with

FvwmRearrange -tile -a -mn 2 -noraise 0 0 100 100

once they are both open.

Unfortunately, I couldn't find a good way to call this at the right
time.  'Wait' doesn't work because it might get me stuck.  'PipeRead'
seems a pretty bad idea for this.

Events might be set up for it, like doing this every time a window of
the Seamonkey class is opened.  But it's still not right.  A pause like
5 seconds or so after starting seamonkey might help, though.

I only need to call this when seamonkey has just been started and has
opened its two windows.

Even then, I don't like it because it's a makeshift workaround for the
missing stacking priority feature.

(After using i3 for a while, I totally realized that it is the job of
the window manger to mange the windows, literally.  It is, by all means,
/not/ the job of the user.  (Once you realized this, you can see the
irony of calling an operating system "Windows", and you even have to say
they did a good job with that.)  Fvwm does a wonderful job when
configured accordingly, yet this is something that still forces me to
manage the windows myself.)

Reply via email to