~mil/lisgd

Add a -s to scale the edge sizes

With some very HiDPI screen, it is hard to trigger edge triggers.
Makefile: add a PHONY target and don't remove config.h on cleanup

Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
remove unused variables & cleanup

Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
lisgd: Allow compiling without support for Wayland

Similar to the preceding commit, this commit adds a new build-time
option `WITHOUT_WAYLAND`. If defined by the user, then we disable the
code to auto-detect the resolution in a Wayland environment and thus
don't need to link against libwayland-client anymore.

With this change we can now build lisgd without support for either X11
or Wayland. In this case the user can still manually specify the desired
display resolution.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
lisgd: Allow compiling without support for X11

We currently always links against libX11. All this is used for though is
to auto-detect the display resolution in an X11 environment. Ultimately,
this is unused functionality in setups that use Wayland exclusively.

Add a build-time option `WITHOUT_X11`: if defined by the user, then we
disable this code and thus don't need to link against libX11 anymore.
The default is still to compile with X11-support enabled.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Makefile: Refactor variables for more flexibility

The Makefile is currently conflating CFLAGS and LDFLAGS with CPPFLAGS
and LIBS, respectively. This has several disadvantages:

    - The user cannot easily override LDFLAGS without causing linker
      errors as it currently tracks the libraries we link against.

    - The user cannot override the `-g` optimization level passed during
      linking as it is not tracked via LDFLAGS.

    - It is hard to control include paths as these arent tracked via
      CPPFLAGS. As a consequence, compiling support for X11 and/or
      Wayland conditionally is hard.

Refactor the Makefile to fix those problems by introducing CPPFLAGS
and LIBS variables and make better use of CPPFLAGS and LDFLAGS. Like
this the user can easily override both CFLAGS and LDFLAGS to override
defaults without causing the build to break. And second this sets the
stage for optional build-time support of both X11 and Wayland.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Makefile: Extend clean target to remove all build artifacts

The `clean` target removes only the `config.h` file, but leaves behind
both `lisgd.o` and `lisgd`. Extend the target to also delete these so
that all build artifacts are covered.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
improve error handling

Check the return value of libinput_path_create_context(3) and malloc(3).
In addition, replace `malloc(0)' with NULL, since the former is IB.

Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Fix manpage typo for DRUL gesture
c06ef771 — Hugo Martinet 2 years ago 0.3.4
fix lisgd on oneplus 6 and other devices

libinput_event_touch_get_y is supposed to return a value in mm but
lisgd assume it's a value in pixels?
maybe libinput_event_touch_get_y give a value in pixels for the
pinephone but at least on the oneplus 6 it gives 70 for the bottom
edge
which obviously breaks lisgd

libinput_event_touch_get_y_transformed is supposed to return a value
in pixels and works perfectly on the oneplus 6

also changed libinput_event_touch_get_x which gave a value in pixels
for consistency and correctness

Signed-off-by: Stacy Harper <contact@stacyharper.net>
CLI option parser: check if value was provided
Update README and manpage documentation for -w and -h params

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Allow specifying -w and -h params to set width/height for edge-based gestures

If -w and -h are set, these values override automatic screen geometry
detection via X/Wayland.  This can be used for two purposes: 1)
In enviroments where screen resolution is not available such as the
framebuffer the size can be passed manually this way and 2) For running
lisgd edge-based gestures on only part of the screen and for debugging.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
6a4ec4b3 — Stacy Harper 3 years ago 0.3.2
Bring back screen width/height detection

This bring back X11 screen detection and also make it Wayland
compatible.

Plus, in Wayland it auto-detect the orientation.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
5287b866 — Stacy Harper 3 years ago
Make lisgd x11 ignorant

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Minor fix for when ActModePressed gestures are defined in config.h (fixes #331)

Signed-off-by: Stacy Harper <contact@stacyharper.net>
190a93d6 — Jochen Sprickerhof 3 years ago
Use pkill -f for $KEYBOARD

Some pkill implementations match on /proc/pid/stat which is limited to
15 characters [1]. $KEYBOARD defaults to svkbd-mobile-intl which is more
then 15 characters, so use -f to match the full string. Note that sxmo
uses busybox pkill by default which does not have this limit.

[1] https://manpages.debian.org/buster/procps/pgrep.1.en.html (Notes)

Signed-off-by: Anjandev Momi <anjan@momi.ca>
623826c0 — Stacy Harper 3 years ago
Fix landscape gestures

Swap height and width values on landscape mode to compute correctly
gestures.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
updated documentation and readme
Implemented an extra "Pressed" action mode that will trigger actions while fingers aren't released yet
Next