[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fvwm
Subject:    Re: FVWM: Conditionally selecting windows on another page.
From:       Jonathan Kotta <jpkotta () gmail ! com>
Date:       2009-08-25 0:44:07
Message-ID: 47c31da80908241744w1512e636r600d7009971d17ba () mail ! gmail ! com
[Download RAW message or body]

On Mon, Aug 17, 2009 at 12:48 PM, Thomas Adam<thomas.adam22@gmail.com> wrote:
> 2009/8/16  <ish@unx.ca>:
>>
>> Hi..
>>
>> I've written a function to swap the windowson one screen with the
>> windows on another screen in a xinerama setup.  It works, but its not
>> ideal
>>
>> DestroyFunc SwapScreens
>> AddToFunc SwapScreens
>> + I All (CurrentPage) MoveToPage 9 0
>> + I GotoPage 9 0
>> + I All (CurrentPage) PipeRead "$[HOME]/.fvwm/MoveToScreenAndWarp.sh $[w.x]"
>> + I GotoPage 0 0
>> + I All (CurrentPage, AnyScreen) PipeRead "$[HOME]/.fvwm/MoveToScreenAndWarp.sh $[w.x]"
>> + I GotoPage 9 0
>> + I All (CurrentPage, AnyScreen) MoveToPage 0 0
>> + I GotoPage 0 0
>>
>> So I move windows to page (9,0) as a holding place.  What I'd like to do
>> is reference the windows on page 9 0 instead of having to goto that
>> page.  Will reduce flicker of the goto's and make it appear more
>> seamless.  Is this possible with a regular function?
>
> Yes, but you can't do it they way you'd like.  I would just mark those
> windows you're going to put on page 9 0 with a State, then you can do:
>
> All (State n) MoveToScreen
>
> Read up on the "State" command/style option.
>
>> Something like:
>>
>> + I All (Page 9 0, AnyScreen) MoveToPage 0 0
>
> No, this isn't possible.
>
> -- Thomas Adam
>
>

I thought this was a neat idea for a function, so I implemented it.

SetEnv SWAP_SCREENS_STATE 3

DestroyFunc SwapScreens
AddToFunc SwapScreens
+ I SetEnv old_pointer_x $[pointer.x]
+ I SetEnv old_pointer_y $[pointer.y]
+ I All State $[SWAP_SCREENS_STATE] off
+ I WindowId root $[LEFT_SCREEN] WarpToWindow 50 50
+ I All (CurrentPage) State $[SWAP_SCREENS_STATE] on
+ I All (State $[SWAP_SCREENS_STATE]) MoveToScreen $[RIGHT_SCREEN]
+ I All (CurrentPage, AnyScreen, !State $[SWAP_SCREENS_STATE]) \
    MoveToScreen $[LEFT_SCREEN]
+ I WindowId root WarpToWindow $[old_pointer_x]p $[old_pointer_y]p
+ I UnSetEnv old_pointer_x
+ I UnSetEnv old_pointer_y

Key     Up      A       4C      SwapScreens

-- 
Thanks,

Jonathan Kotta

Hofstadter's Law:
    It always takes longer than you expect, even
    when you take into account Hofstadter's Law.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic