I'm working in multi display workspace, I would like to have keyboard shortcut for moving active window to another display (I don't mean workspaces). How can I achieve this in XFCE? In Unity I was using Compiz with predefined keyboard shortcuts.

my workspace


XFCE does not have a built-in command that allows you to move a window to another monitor, however there is this Python script that can do that.

The script is used as:

movescreen.py <up|down|left|right|prev|next|fit> [win_id|mouse]
  • First, make sure the script's dependencies are satisfied:

    sudo apt install python xrandr xwininfo wmctrl xdotool
  • Download the script and move it to the folder that you want, for example ~/scripts/ (I am assuming this as the script's folder for the next steps, you may, however, use whatever you want).

  • Give executable rights to the script:

    chmod u+x ~/scripts/movescreen.py
  • Open Keyboard and select the Application Shortcuts tab.

  • Click the Add button at the bottom left.

  • In the Command pop-up window enter the command to move the window, using the absolute path to the script. For example, to move the window to the monitor left, enter:

    /home/<your_username>/scripts/movescreen.py left
  • Press OK and assign the shortcut you want, for example Ctrl+Super+Left.

  • Repeat the steps for all other directions.

The script is not perfect, but works reasonably well. Also, being built in Python means that it is relatively easy to tweak it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.