Hi Ethan,

In the menu, I have an off by one error. Desks should be numbered starting from 
zero, not one.

There are 2 hard problems in computer science: cache invalidation, naming 
things, and off-by-1 errors.

Cheers,

Ron

________________________________________
From: Tapia, Ron <rd...@psu.edu>
Sent: Monday, March 1, 2021 10:13 AM
To: Ethan Raynor; fvwm
Subject: Re: FVWM: Move windows to a new desk preserving pages

Hi Ethan,

It sounds like a solution that just moves one window to another desktop while 
preserving the page would work for you.
I think that the config below does what you want.

This function lets you pick a window and send it to a desktop. It appears to 
preserve the page:

DestroyFunc mdesk
AddToFunc  mdesk
+ I  Pick
+ I MoveToDesk 0 $0

I bind my middle mouse button on the root window to a menu that I call 
"Window-Ops". So I would invoke it like so:

Mouse 2 R       N       Menu Window-Ops Nop

AddToMenu Window-Ops "Window Ops "      Title
+ "Move To Desk    "    Popup MoveToDesk


AddToMenu MoveToDesk  "Move to Desk" Title
+ "Desk1            " Function mdesk 1
+ "Desk2            " Function mdesk 2
+ "Desk3            " Function mdesk 3
+ "Desk4            " Function mdesk 4
+ "Desk5            " Function mdesk 5
+ "Desk6           " Function mdesk 6
+ "Desk7           " Function mdesk 7

You could do something similar with a function bound to windows so that you 
don't have to pick.

Cheers,

Ron

________________________________________
From: Ethan Raynor <ethanrayno...@gmail.com>
Sent: Monday, March 1, 2021 9:24 AM
To: fvwm
Subject: Re: FVWM: Move windows to a new desk preserving pages

Hi Dominik,

On Mon, Mar 1, 2021 at 1:51 PM Dominik Vogt <dominik.v...@gmx.de> wrote:
> Can you please be more precise?  You're mixing the terms page,
> desk and screen which are all differet things.  Could you give an
> example of the workflow?  It's hard for me to imagine what you're
> actually doig that could require to move all windows from oe
> desktop (page?) to another.  Why is it not good enough to make the
> windows on desk 1 sticky?

Mea culpa! i admit that i am confusing myself as well. Let me try once more.

I am using fvwm2 (2.6.9).

I have two monitors and the following config:

DesktopSize 3x3
DesktopName 0 Main
DesktopName 1 Dev
DesktopName 2 Bills
DesktopName 3 Chat

as i understand this, i now have four desktops, each with 9 pages on
them - this is what FvwmPager agrees with.

As i move between desks, i often try and stick to adding windows to
the correct desks so that i have some separation of work ("Dev" for
development, "Chat" for ms-teams, etc.)  This works well for me.

But sometimes I find that I want to shift the windows from, say, the
"Dev" desk to my other monitor which is free of any windows. so i
thought i had to do it like this:

all (desk 1) movetoscreen

where i first of all open fvwmconsole on screen2 (the one i want
windows from the Dev desktop to move from) and run the command.

This works - the windows from the Dev desktop are moved to screen2,
but they don't keep the page they were on, on the new screen - every
window is now on the same page on screen2. what i want is for the
windows on the Dev desk to move across to screen2, "mirroring" the
location/page they were on screen1 with, only now, on screen2.

Does this make any sense now? i hope it does - apologies if it isn't -
and i will try again to explain

thanks all for your time.
Ethan


Reply via email to