Since I use this a lot in my daily work and there were no scripts working properly for me, I made one myself.
It's actually not bound to Xfce but should work on any window manager (haven't tried it, though).
If you don't yet have xdotool
, install it:
sudo apt-get install xdotool
If you don't yet have wmctrl
, install it:
sudo apt-get install wmctrl
Store the attached file in some place that's in your PATH
.
The cool kids use ~/bin/
.
Make it executable: chmod +x ~/bin/move-to-next-monitor
Open up a terminal and run it:
move-to-next-monitor
There should be no errors and the terminal window should have moved one monitor to the right.
move-to-next-monitor
and assign a keyboard shortcut to it.Done!
Props to icyrock.com Show archive.org snapshot who had a script that was basically working (not properly on 3 monitors and was lacking some workarounds) and saved me quite some time figuring this all out.