Move windows around in XFCE

There's this cool feature in Unity and MacOS (that I know of) where you can use some keybinding to place windows as blocks in your screen, like this:




The idea is that by pressing SUPER+LEFT the current window is placed on the left of your desktop.




As mentioned, XFCE doesn't support this out-of-the-box, but it's very easy to implement:



And that's pretty much it the whole script. You'll need to install xdotool which is what does all the magic. To add your own shortcuts, got to "Settings -> Settings Manager -> Keyboard -> Application Shortcuts" and add your own.



As you can see in the screenshot, I saved this script as /usr/bin/window-placer

The options for the script are: -u (up), -d (down), -l (left), -r right & some combinations like -u -l (upper left corner) and so on. The --offset-y and --offset-x options are important if you don't want the window to hide the panels.

4 comentarios:

  1. Este comentario ha sido eliminado por un administrador del blog.

    ResponderEliminar
  2. Arg! Sorry for deleting your comment, it appeared duplicated. Stupid blogger.com

    ResponderEliminar
  3. Don't know if I did the right thing but I gave the /usr/bin/window-placer 777-rights in order to make it executable. What permissions have you set?

    ResponderEliminar
  4. 04:35 PM Thu Dec 13 $ ls -l /usr/bin/window-placer
    -rwxrwxrwx 1 root root 4758 Aug 21 14:46 /usr/bin/window-placer

    ResponderEliminar