Example on how to move window to the other xinerama screen

Have a problem writing a FVWM function? Post your problem here, or post example functions that you think others' will enjoy.
User avatar
mimosinnet
Pussycat
Pussycat
Posts: 85
Joined: Thu Jul 12, 2007 3:54 am

Example on how to move window to the other xinerama screen

Postby mimosinnet » Tue Feb 11, 2014 5:48 am

This is a xinerama setting with two screens. I want to move the window under the cursor to the other screen pressing the <window-key><s>. Screen 0 starts at the x position 1440 while screen 1 starts at x position 0 (yes, screen 0 is at the right of screen 1 :shock: !). This is what I have come up with:

Code: Select all

Key s   W 4   F-Screen

DestroyFunc F-Screen
AddToFunc F-Screen
+ I SetEnv v_window_x $[w.x]
+ I SetEnv v_screen 0
+ I PipeRead '[ "$[v_window_x]" -ge "1440" ] && echo SetEnv v_screen 1'
+ I MoveToScreen $[v_screen]
+ I WarpToWindow 50 50



Let me know if you have an easier example!

Cheers!

Return to “Complex functions”

Who is online

Users browsing this forum: No registered users and 1 guest