Skip to content

PacketPerception/movescreen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Movescreen

This Python script moves the window with focus on an adjacent monitor. It is intendend for window managers lacking this shortcut like XFCE.

Usage

movescreen.py <up|down|left|right>

It should be compatible with Python 2.7 and 3.

XFCE setup

Copy movescreen.py in /usr/local/bin, then:

chmod a+rx /usr/local/bin/movescreen.py

Go to Setting -> Keyboard -> Application shortcuts then add one shortcut for each direction:

Command Shortcut
/usr/local/bin/movescreen.py left Ctrl+Super+Left
/usr/local/bin/movescreen.py right Ctrl+Super+Right

Depends on

  • python
  • xrandr
  • xwininfo
  • wmctrl (not installed by default on Ubuntu, try sudo apt-get install wmctrl )

How does it work?

The script scans for the list of monitors and check their relative positions.

It gather information about the current active window (size, position and flags). It also find on which monitor the window has the biggest area.

Depending on the argument, it moves the window on the selected adjacent monitor (if any) and restore the previously set flags.

Drawback

A little bit slow the first time it is run.

Only tested with two monitors.

Author and licence

Antoine Calando - 2017 - Public domain.

About

Linux script to move windows across screens

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%