Ubuntu – XFCE – Send window to other monitor on keystroke

keyboard shortcutsmulti-monitorxfcexubuntu

I am running Xubuntu 11.10 with a dual monitor setup. I am looking to create a keystroke (maybe CTRL + ALT + SPACE which will allow me send a selected window to the next monitor.

In GNOME there is a package called swapmonitor which is capable of sending the window to the other monitor. Calling this program with a keystroke achieves the same effect.

How is this done in XFCE/Xubuntu?

Best Answer

This was posted a while ago and I am sure you have gotten your answer already, but for those who haven't.

Run these commands

sudo apt-get install xdotool
sudo apt-get install wmctrl

Then download the bash script from the following link (credit to jc00ke) https://github.com/jc00ke/move-to-next-monitor

Personally, I have a directory in my root where I store all my personal scripts. However, where you download it is really up to you. Change it to have permissions so you can execute. For example, save the scripts as move-to-next-monitor.sh and then execute the following

chmod 755 move-to-next-monitor.sh
  1. settings manager -> keyboard -> application shortcuts
  2. Click Add
  3. Click Open and direct it to your script
  4. Assign a keyboard shortcut to it and voilà!

You now have a keyboard shortcut to switch a window from 1 screen to another. I am not sure how it works with more than 2 screens.

Related Question