Discussion:
FVWM: Query regarding MoveToDeskAndPage
Stuart Longland
2013-03-03 03:06:38 UTC
Permalink
Hi all,

I spent a few hours this weekend tweaking my FVWM key bindings. One
thing I'm trying to get working is the ability to move a window to an
arbitrary desk and page. I'm running FVWM 2.6.3 and will try 2.6.5 in a
moment.

http://stuartl.longlandclan.yi.org/htdocs/blog/wp-content/uploads/2013/03/fvwm-config.tar.xz
has the full configuration. A full run down on the configuration is
here: http://stuartl.longlandclan.yi.org/blog/2013/03/03/fvwm/
DestroyMenu JumpToDesk1
AddToMenu JumpToDesk1
+ "Jump to Desk 1..." Nop
+ "Page &1 (Q)" GotoDeskAndPage 0 0 0
+ "Page &2 (W)" GotoDeskAndPage 0 1 0
+ "Page &3 (E)" GotoDeskAndPage 0 0 1
+ "Page &4 (R)" GotoDeskAndPage 0 1 1
+ "&Move" Popup MoveToDesk1
DestroyMenu JumpToDesk2
AddToMenu JumpToDesk2
+ "Jump to Desk 2..." Nop
+ "Page &1 (Q)" GotoDeskAndPage 1 0 0
+ "Page &2 (W)" GotoDeskAndPage 1 1 0
+ "Page &3 (E)" GotoDeskAndPage 1 0 1
+ "Page &4 (R)" GotoDeskAndPage 1 1 1
+ "&Move" Popup MoveToDesk2
DestroyMenu JumpToDesk3
AddToMenu JumpToDesk3
+ "Jump to Desk 3..." Nop
+ "Page &1 (Q)" GotoDeskAndPage 2 0 0
+ "Page &2 (W)" GotoDeskAndPage 2 1 0
+ "Page &3 (E)" GotoDeskAndPage 2 0 1
+ "Page &4 (R)" GotoDeskAndPage 2 1 1
+ "&Move" Popup MoveToDesk3
DestroyMenu JumpToDesk4
AddToMenu JumpToDesk4
+ "Jump to Desk 4..." Nop
+ "Page &1 (Q)" GotoDeskAndPage 3 0 0
+ "Page &2 (W)" GotoDeskAndPage 3 1 0
+ "Page &3 (E)" GotoDeskAndPage 3 0 1
+ "Page &4 (R)" GotoDeskAndPage 3 1 1
+ "&Move" Popup MoveToDesk4
DestroyMenu MoveToDesk1
AddToMenu MoveToDesk1
+ "Move to Desk 1..." Nop
+ "Page &1 (Q)" MoveToDeskAndPage 0 0 0
+ "Page &2 (W)" MoveToDeskAndPage 0 1 0
+ "Page &3 (E)" MoveToDeskAndPage 0 0 1
+ "Page &4 (R)" MoveToDeskAndPage 0 1 1
+ "&Jump" Popup JumpToDesk1
DestroyMenu MoveToDesk2
AddToMenu MoveToDesk2
+ "Move to Desk 2..." Nop
+ "Page &1 (Q)" MoveToDeskAndPage 1 0 0
+ "Page &2 (W)" MoveToDeskAndPage 1 1 0
+ "Page &3 (E)" MoveToDeskAndPage 1 0 1
+ "Page &4 (R)" MoveToDeskAndPage 1 1 1
+ "&Jump" Popup JumpToDesk2
DestroyMenu MoveToDesk3
AddToMenu MoveToDesk3
+ "Move to Desk 3..." Nop
+ "Page &1 (Q)" MoveToDeskAndPage 2 0 0
+ "Page &2 (W)" MoveToDeskAndPage 2 1 0
+ "Page &3 (E)" MoveToDeskAndPage 2 0 1
+ "Page &4 (R)" MoveToDeskAndPage 2 1 1
+ "&Jump" Popup JumpToDesk3
DestroyMenu MoveToDesk4
AddToMenu MoveToDesk4
+ "Move to Desk 4..." Nop
+ "Page &1 (Q)" MoveToDeskAndPage 3 0 0
+ "Page &2 (W)" MoveToDeskAndPage 3 1 0
+ "Page &3 (E)" MoveToDeskAndPage 3 0 1
+ "Page &4 (R)" MoveToDeskAndPage 3 1 1
+ "&Jump" Popup JumpToDesk4
DestroyMenu JumpToDeskX
AddToMenu JumpToDeskX
+ "Jump to ..." Nop
+ "Desk &1" Popup JumpToDesk1
+ "Desk &2" Popup JumpToDesk2
+ "Desk &3" Popup JumpToDesk3
+ "Desk &4" Popup JumpToDesk4
+ "&Move" Menu MoveToDeskX
DestroyMenu MoveToDeskX
AddToMenu MoveToDeskX
+ "Move to ..." Nop
+ "Desk &1" Popup MoveToDesk1
+ "Desk &2" Popup MoveToDesk2
+ "Desk &3" Popup MoveToDesk3
+ "Desk &4" Popup MoveToDesk4
+ "&Jump" Menu JumpToDeskX
# Jump to a page
Key grave A 4 GotoDesk prev
Key 1 A 4 GotoDesk 0 0
Key 2 A 4 GotoDesk 0 1
Key 3 A 4 GotoDesk 0 2
Key 4 A 4 GotoDesk 0 3
Key Tab A 4 GotoDeskAndPage prev
Key Q A 4 GotoPage 0 0
Key W A 4 GotoPage 1 0
Key E A 4 GotoPage 0 1
Key R A 4 GotoPage 1 1
Key T A 4 GotoPage prev
Key Escape A 4 Menu JumpToDeskX
# Move window to a page
Key asciitilde A 4 MoveToDesk prev
Key exclam A 4 MoveToDesk 0 0
Key at A 4 MoveToDesk 0 1
Key numbersign A 4 MoveToDesk 0 2
Key dollar A 4 MoveToDesk 0 3
Key Tab A S4 MoveToDeskAndPage prev
Key Q A S4 MoveToPage 0 0
Key W A S4 MoveToPage 1 0
Key E A S4 MoveToPage 0 1
Key R A S4 MoveToPage 1 1
Key T A S4 MoveToPage prev
Key Escape A S4 Menu MoveToDeskX
The idea is I can quickly jump between pages by hitting Logo+Escape
(Logo="Command" on the MacBook, or the Windows key), or move a window to
another page with Logo+Shift+Escape.

The former works well, I just hit Logo+Escape, dial in two digits, and
I'm there. For bonus points, with the exception of the Logo key, the
keys are all in close proximity.

However, the option to move to a window doesn't seem to work.
MoveToDeskAndPage prev does things, as I'm able to usefully hit
Logo+Shift+Tab to move between two pages on different desktops, but
moving a window to a specific desk and page doesn't seem to work.

Is there some trick to make this work?
--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
...it's backed up on a tape somewhere.
Stuart Longland
2013-03-03 03:45:06 UTC
Permalink
Post by Stuart Longland
However, the option to move to a window doesn't seem to work.
MoveToDeskAndPage prev does things, as I'm able to usefully hit
Logo+Shift+Tab to move between two pages on different desktops, but
moving a window to a specific desk and page doesn't seem to work.
Hmm, actually, I just updated to FVWM 2.6.5 and tested this more
closely, and it doesn't seem to work. How do I implement this?
--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
...it's backed up on a tape somewhere.
ryo
2013-03-04 00:11:48 UTC
Permalink
Post by Stuart Longland
Post by Stuart Longland
However, the option to move to a window doesn't seem to work.
MoveToDeskAndPage prev does things, as I'm able to usefully hit
Logo+Shift+Tab to move between two pages on different desktops, but
moving a window to a specific desk and page doesn't seem to work.
Hmm, actually, I just updated to FVWM 2.6.5 and tested this more
closely, and it doesn't seem to work. How do I implement this?
Hi

You sure can switch between page or desk, but you forgot to "warp" to
the window.
You can use 2 things that come in my mind , either store window ID and
after moving the window to the desired location , warping to it or
stick the window, move to the desired location, unstick the window.

The later one is fine to me because you don't need to manage $.

DestroyFunc StickMe
AddToFunc StickMe \
I ThisWindow (Sticky) Stick
+ I testRc (NoMatch) ThisWindow (Focused, !Iconic, !Root) Stick


DestroyFunc mytest
AddToFunc mytest \
I StickMe
+ I GoToPage 2 2
+ I StickMe
--
did not found anything smart/funny to write here.
Loading...