Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
|Scripts quick access edit this|
- Author: Pat Regan <email@example.com>
- Download: send-to-head.jl
Send focused window to next/previous Xinerama head.
Allows binding a hotkey to send the currently focused window to the next or previous Xinerama head. It's somewhat smarter than my last attempt, and should work with any number of heads. It should also move the head to the proper position on heads with different resolutions as well. Meaning, that is you have a window at 512 pixels over on a 1024 pixel wide screen, and move it to a 1280 wide screen the window will position itself at 640.
If this script doesn't appear to work for you -- in my case, it simply beeped without displaying any error message -- and your X heads have differing resolutions, there may be a problem caused by passing non-integer coordinates to the move-window-to function. To fix this, change the two lines that read:
(setq newx (+ (* (/ nhx chx) (- x chox)) (car (head-offset nh)))) (setq newy (+ (* (/ nhy chy) (- y choy)) (cdr (head-offset nh))))
(setq newx (round (+ (* (/ nhx chx) (- x chox)) (car (head-offset nh))))) (setq newy (round (+ (* (/ nhy chy) (- y choy)) (cdr (head-offset nh)))))
Note that this pair of lines occurs twice in the file, in both the send-to-next-head and sent-to-previous-head functions, so you will want to change it in both.
Hope that helps! -- Shimon Rura <firstname.lastname@example.org>