Keegan McAllister: taralli: Screen edge pointer wrapping for X

综合技术 2012-09-10

The maximum travel distance between points on a desktop is substantially reduced if the pointer is allowed to travel off a screen edge and reappear at the opposite edge. In other words, we change the topology of the desktop to be that of a torus. This is not a new idea: it's implemented in several
window managers
, programs for
Mac OS X
, and is even the subject of a
research paper

I wanted a standalone program to implement mouse pointer wrapping for X Windows on GNU/Linux. Previously I was using
for this task. Synergy is a very cool program, but it's not a good choice for pointer wrapping on a single machine.

  • Correctness
    : I have several monitors at different resolutions, which means my desktop isn't rectangular. Synergy didn't understand where the edge of each monitor is.

  • Security
    : I don't need the exposure of 95,000 lines of code for this simple task. Even if there are no bugs in Synergy, I'm one configuration mistake away from running an unencrypted network keylogger.

  • Energy efficiency
    : Synergy wakes up 40 times per second even when nothing is happening. This can have a significant impact on laptop battery life.

So I wrote


as a simple replacement. It doesn't automatically understand non-rectangular desktops, but you can easily customize the pointer position mapping, to implement multi-monitor wrap-around or many other behaviors. (If someone would like to contribute the code to get multi-monitor information from
or something, I would be happy to add that.)

is under 100 lines of C99. It has been tested on GNU/Linux and is likely portable to other X platforms. You can
download it from GitHub
, which is also a great place to submit any bug reports or patches.

责编内容by:main is usually a function (源链)。感谢您的支持!


计算机制造商 System76 准备自己打造桌面 Linux PC... 早在2017年4月,System76 就已宣布他们将开始设计和打造他们自己的计算机,从台式机开始,然后自己制造笔记本,而不是要过度依赖于上游供应商。目前看来,这...
linux策略路由 https:...
【国际资讯】 Tor浏览器中存在TorMoil漏洞 导致用户真实IP地址遭泄露... 2017-11-06 19:08:50 阅读:229次 来源: 作者...
Multi environment logging with Serilog for AspNet ... Multi environment logging with Serilog for AspNet Core Few months ago we ...
Linux下file命令使用技巧 1. Windows以不同的扩展名来区分不同的文件,例如:.exe .png等 2. Linux下对扩展名没有明确的要求有时就会遇到各种坑,当我...