Code Monkey home page Code Monkey logo

taralli's Introduction

taralli: Screen edge pointer wrapping for X

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. taralli is a tiny standalone program for X Windows which, while running, implements this functionality. In other words, it changes the topology of the desktop to be that of a torus.

taralli has been tested on GNU/Linux and is likely portable to other X platforms. I would appreciate any bug reports and patches, which you can submit through GitHub.

For the common case of a rectangular desktop, you can build and run taralli like so:

$ ./build.sh rectangular
$ ./taralli_rectangular

Customization

Perhaps you have a non-rectangular desktop, composed of several monitors at different resolutions. Or you might have different preferences for where the mouse pointer goes when it reaches a screen edge. taralli supports a simple form of customization; see map_beef.c for an example. You define a C function

void map(int *x, int *y);

which receives pointers to the current mouse coordinates, and is allowed to modify those coordinates. A macro WRAP(var, from, to) is available; it expands to (roughly)

if (*var == from) {
    *var = to;
    return;
}

Another function

void map_init(Display *dpy);

will run at program start.

You can build and run the customized program with e.g.

$ ./build.sh beef
$ ./taralli_beef

License

taralli is available under a BSD license. See the LICENSE file.

taralli's People

Contributors

kmcallister avatar

Watchers

Justin Hoppensteadt avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.