I'm using my laptop in different configurations.
Sometimes i'm using only laptop, with LVDS1 output. Sometimes i've one monitor(DP1) on right of LVDS. Sometimes on left. Sometimes i have two monitors(DP2/DP3) – one on left, and one on right of LVDS
I would like to setup my desktop for this environment. I want xfce panel always on LVDS, web browser – always on external monitor(and if are 2 monitors – on right), communicator(pidgin) on left (DP2) or LVDS if there is no left monitor.
I've prepared set of script to configurue xserver using xrandr – for all configurations. position of panel i'm setting by xfconf-query.
But – how to move specific application to specific monitor?
For example – how to run all pidgin applications to DP2? I don't want do it by mouse – i want to move all filtered xwindow clients to specific display. It's possible?
Best Answer
If your main objective is to avoid using the mouse, this script allows for a keyboard shortcut to move the windows between monitors. It works great for me on my triple monitor setup. Then you can assign a keyboard shortcut to tile after moving to a new monitor.
Source: https://github.com/jc00ke/bin/blob/master/move-to-next-monitor. Thanks to jc00ke!
Source: http://makandracards.com/makandra/12447-how-to-move-a-window-to-the-next-monitor-on-xfce-xubuntu
For different size monitors
I have a 1920x1080 center monitor and two 1440x900 side monitors.
The above two commands output the dimensions of my largest monitor even if the window happens to be on a side monitor. Therefore the script always moved the window according to these dimensions. This caused the script to not always move to the next monitor, but sometimes it would move to the previous monitor. I took my overall screen width (4800) and divided it by three. Now it always moves to the next monitor.