Re: FVWM: Is there a way to ignore other windows when placing one?

2015-10-20 Thread Michael Großer
lee wrote:
> Michael Großer  writes:
> 
>> Michael Großer wrote:
>>> Dan Espen wrote:
 lee  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

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.

> 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.

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.

> 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).

Call this:
# cd your_dir_where_you_saved_my_stuff
# man ./FvwmEvent.1.in

According to that old man page, you should try the 'add_window' event:
--> Runs when a window is initially mapped.

If it does not fit, read the table and evaluate each event in your own
way to find a possibly better one.

How can you use events?

This is how I do it:

> DestroyFunc FvwmEvent_destroy_window
> DestroyFunc FvwmEvent_new_page
> DestroyFunc FvwmEvent_new_desk
> DestroyFunc FvwmEvent_focus_change
>
> *FvwmEvent: destroy_window "Function 'FvwmEvent_destroy_window'"
> *FvwmEvent: new_page   "Function 'FvwmEvent_new_page'"
> *FvwmEvent: new_desk   "Function 'FvwmEvent_new_desk'"
> *FvwmEvent: focus_change   "Function 'FvwmEvent_focus_change'"

I attach empty functions to these events that I need and fill
the functions with contents later in my scripts.


> And how do I prevent this function from being
> called when the window that is moved out of the way is placed?

You could solve this like a programmer would solve it:
- When you initialize your event handler, set a variable 'i_am_listening'
  to TRUE or 1 or whatever
- When the handler comes to action:
  - Quit the handler without 

Re: FVWM: Is there a way to ignore other windows when placing one?

2015-10-19 Thread Lucio Chiappetti

On Sat, 17 Oct 2015, lee wrote:

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.


As other said, people usually use the pager to move among multiple desks 
(or multiple pages of one desk, or multiple pages of multiple desks), but 
one can implement other ways ... menus in the root menu, buttons in a bar 
or widget, keyboard accelerators, menus in the window menu (to move a 
window to occupy a given desk or page). I have implemented most of those 
in my .fvwmrc although I do not use all of them with the same frequency 
(see http://sax.iasf-milano.inaf.it/~lucio/WWW/Opinions/window.html for 
screenshots and links to examples)


--

Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy)
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html

Do not like Firefox >=29 ?  Get Pale Moon !  http://www.palemoon.org



Re: FVWM: Is there a way to ignore other windows when placing one?

2015-10-17 Thread Dan Espen
lee  writes:

> Michael Großer  writes:
>
>> Michael Großer wrote:
>>> Dan Espen wrote:
 lee  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.

Most users use FvwmPager to switch desks.
Key mappings work too.
Look at the GotoDesk and GotoDeskAndPage commands.

-- 
Dan Espen



Re: FVWM: Is there a way to ignore other windows when placing one?

2015-10-17 Thread lee
Michael Großer  writes:

> Michael Großer wrote:
>> Dan Espen wrote:
>>> lee  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.


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 :)


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?  And how do I prevent this function from being
called when the window that is moved out of the way is placed?

(In most cases, I probably won't need that because I'm using starter
functions to start applications which create windows, but applications
can create windows by themselves ...)


-- 
Again we must be afraid of speaking of daemons for fear that daemons
might swallow us.  Finally, this fear has become reasonable.



Re: FVWM: Is there a way to ignore other windows when placing one?

2015-10-17 Thread Dan Espen
elliot s  writes:

> If fvwm can (be made to) optionally ignore lower layers during
> auto-placement, that would work.

Long ago, Fvwm got so many options that I'm unable to keep track.

MinOverlapPlacementPenalties has a series of arguments including "below"
that may help.

-- 
Dan Espen



Re: FVWM: Is there a way to ignore other windows when placing one?

2015-10-11 Thread Michael Großer
Dan Espen wrote:
> lee  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 you 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 :-)



Re: FVWM: Is there a way to ignore other windows when placing one?

2015-10-11 Thread Michael Großer
Michael Großer wrote:
> Dan Espen wrote:
>> lee  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



Re: FVWM: Is there a way to ignore other windows when placing one?

2015-10-11 Thread Dan Espen
lee  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?

-- 
Dan Espen