Hi, as a FVWM beginner I want to ask a simple question, how to toggle(move) current window between page 0 and page 1
e.g. when “toggle window” function is triggered, if current window is on page 0, then move the window to page 1, if current window is on page 1 then move the window to page 0
The basic pseudo code is as follows:
if “current page” == 0;
move current window to page 1
if “current page” == 1;
move current window to page 0
I tried something like:
DestroyFunc MoveToDiffPage
AddToFunc MoveToDiffPage
I Current PipeRead ‘if [ $[page.nx] -eq 0 ]; then echo MoveToPage 1 0; else echo MoveToPage 0 0;’
also tried :
I ThisWindow PipeRead ‘if [ $[page.nx] -eq 0 ]; then echo MoveToPage 1 0; else echo MoveToPage 0 0;’
it does not work either… BTW what difference between “Current” and “ThisWindow”?
This would move a window between page 0 0, and the page below it (0 1).
There’s probably something missing from your example because it looks as though it should work. You can check STDERR as FVWM might have logged something there.
As to what the difference is between ThisWindow and Current is… not much. ThisWindow is in context of the implied window that’s being referenced. It might imply Current (as in the focused window), or it might be referencing a window via Pick or Next, etc.
your solution is better, When Fvwm system reads the variables, the task of determining which is current desktop has been done, do not need “if bla bla …”
it works on my configs
Thanks for your patience to explain, nice weekend!
but why this version does not work? what is wrong with this one? I just want to understand more of FVWM funcations. (my FVWM only has 2 desks, each desk has 2 pages .)