encircle
is a window manager agnostic tool that wraps your X cursor around the
edges of the screen and is specifically designed to work with asymmetric
multi-monitor Xinerama setups.
In practice what this means is that the screen area is turned into a flat torus in that when the cursor hits a screen edge then it will continue and reappear on the opposite edge.
If the cursor position is not within the target screen then the cursor will snap to the nearest edge of that screen.
By default cursor wrapping is enabled on both horizontal and vertical axes.
┌───────┐
│ 1┄┤
│ │┌───────────────^─┐┌───────┐
│ │├┄1┄> 4 ││ │
│ ││ ││ │
│ A ││ B ││ C │
│ ││ ││ │
├┄2 │├┄3┄> ││ <┄2┄┤
│ │└───────────────^─┘│ │
│ 3┄┤ │ │
└───────┘ └───────┘
In the above example we have four transitions:
- snaps to the adjacent monitor (rather than hitting a hard wall)
- wraps the cursor from monitor A to monitor C which is the rightmost monitor
- snaps to the adjacent monitor (rather than hitting a hard wall)
- wraps around monitor B because there is no other monitor above or below
If the monitor arrangement is changed (e.g. using xrandr) then encircle will be notified of that and update monitor positions and dimensions accordingly.
$ git clone https://github.com/bakkeby/encircle.git
$ cd encircle
$ sudo make install
$ encircle
This is also available in the AUR.
- base-devel
- extra/libxinerama
- libxi
sudo pacman -S base-devel extra/libxinerama libxi
- build-essential
- libxinerama-dev
- libxi-dev
sudo apt install build-essential libxinerama-dev libxi-dev
- base-devel
- libXinerama-devel
- libXi-devel
xbps-install -Su base-devel libXinerama-devel libXi-devel
This work is largely derived from the dwm window manager in relation to its handling of monitors in a Xinerama setup. The work is inspired by xoop and taralli.
encircle
is available under an MIT license. See the LICENSE
file.