Home

Awesome

omniGlass: touchpad gestures library

(DISCLAIMER) This is W.I.P; examples available at src/tests/

STATUS (v0.2.1)

https://github.com/guarapicci/mpv-omniGlass/assets/143821200/d76cfa4c-902c-4cea-83ea-c51126f85f82

https://github.com/guarapicci/omniGlass/assets/143821200/0ef46864-e9b8-4218-96c3-8b4d17b1e7ef

mpv-omniglass is the first piece of software to link to libomniglass.

licensing

as of this writing, this software is licensed under GPLv3.

Get OmniGlass (for arch linux users)

Build from source

Detailed instructions (if quick start failed)

You're gonna need cmake, GCC, a lua interpreter compatible with 5.1 and your run-of-the-mill linux distro (usually includes everything else needed).

example: swipetap.c (shows how to use the API)

#include "../omniglass.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

void on_slide(double value) {
    if (value < 0)
        printf("moved left\t\t%g\n", value);
    else if (value > 0)
        printf("moved right\t\t%g\n",value);
    fflush(stdout);
}

int main(int argc, char **argv) {
        
    struct omniglass *handle;
    if (omniglass_init(&handle) != OMNIGLASS_RESULT_SUCCESS)
        fprintf(stderr,"could not initialize omniglass.\n");
    omniglass_listen_gesture_slide(handle,&on_slide);
    fflush(stdout);
    printf("starting event loop\n");
    while (true) {
        omniglass_step(handle);
    }
    
    return 0;
}

WINDOWS PORTING

A windows port is not available (and there is no demand for it) at the moment.

To those willing to start a windows port of omniglass, i suggest you start from platform_linux.c, replacing all the evdev stuff with libhid equivalents.

What is this thing?

summing up: A library for touchpad gestures and a mouse/keyboard/joypad emulator that uses these gestures.

long version: Omni-Glass is a touchpad gesture detection engine for linux desktops. It provides two things:

We are not touchégg.

The purpose of Omni-Glass is to implement arbitrary gestures for each application, instead of just doing desktop-wide actions like switch window & expand desktop. We do plan on providing a PIE, mainly for videogames, but applications with source code available can (and should) properly map touch gestures to actions due to how contextual any given gesture could be.