1
0
Rozštěpit 0
Lock a mouse cursor to a single monitor for multi-seat setups. https://aweirdimagination.net/2019/06/02/lightweight-multiseat-x/
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Daniel Perelman a6fa562527 Make top/bottom barriers large enough to avoid triggering hidden panels. před 5 roky
.gitignore Initial commit před 5 roky
LICENSE Initial commit před 5 roky
README.md Wrote README. před 5 roky
monitor-lock-xcb.py Make top/bottom barriers large enough to avoid triggering hidden panels. před 5 roky
monitor-lock.py Make top/bottom barriers large enough to avoid triggering hidden panels. před 5 roky

README.md

monitor-lock

Lock a cursor to a single monitor using XFIXES 5.0 barriers to stop the cursor from moving off the specified screen. If the cursor is not presently on that screen, then it can be moved onto it but not back off of it.

The intention is for this to be used in conjunction with the multi-pointer X support of XInput2 to create a multi-seat setup where different pointers are assigned to different monitors, but it may have other uses.

Run it once without arguments to see the options for devices and screens. For example, the output may look like this:

$ ./monitor-lock.py 
Found XFIXES version 5.0
Found XInputExtension version 2.0
Found XINERAMA version 1.1

Available screens:
screen 0: {'x': 0, 'y': 0, 'width': 3840, 'height': 2160}
screen 1: {'x': 3840, 'y': 0, 'width': 1920, 'height': 1200}
screen 2: {'x': 3840, 'y': 1200, 'width': 1920, 'height': 1080}

Available pointers:
device 2: Virtual core pointer

USAGE: ./monitor-lock.py [device] [screen]

Then running

./monitor-lock.py 2 0

would keep the (in this example, only) cursor on the 3840x2160 monitor for as long as monitor-lock.py was still running.