Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
33c7371
- Added pinch gestures
osleg Oct 27, 2019
cc87980
Pinch Gesture
osleg Oct 30, 2019
42b068f
Added swipe gestures threshold
osleg Oct 31, 2019
2d57aab
Updated README.md with settings examples
osleg Oct 31, 2019
3047c04
Update README.md
osleg Oct 31, 2019
3178dc8
Update README.md
osleg Oct 31, 2019
5771f01
Unified setting names
osleg Oct 31, 2019
07b0ca8
Continous pinch and swipe gestres
osleg Nov 3, 2019
78f5881
added ccls-cache, kdev4 and clangd to gitignore
osleg Nov 6, 2019
d8d4853
Added archlinux PKGBUILD
osleg Nov 6, 2019
b5c05d6
Travis CI + SystemD (#3)
osleg Nov 6, 2019
14f3e72
Changed repo target for travis
osleg Nov 6, 2019
b868770
fixed travis repo
osleg Nov 6, 2019
945d3c9
Update README.md
osleg Nov 6, 2019
9bbccff
Added deploy release to travis
osleg Nov 6, 2019
c7f12d0
Merge branch 'master' of github.com:osleg/gebaar-libinput
osleg Nov 6, 2019
e59c0e8
Trying to fix travis
osleg Nov 6, 2019
8020ee4
Updated README.md with correct config keys
osleg Nov 7, 2019
068a4c0
Fixing continous swipe bug
osleg Nov 25, 2019
68a57ed
updated travis with correct repo name
osleg Nov 27, 2019
8c3f67d
Release and git PKGBUILDs
osleg Nov 28, 2019
b4163c2
Reformatted all sources
osleg Nov 28, 2019
ecbcaba
updated README for upstream
osleg Mar 13, 2020
ccbe92c
Updated travis and PKGBUILD
osleg Mar 13, 2020
0efe66d
repo name fix
osleg Mar 13, 2020
84ff26a
Add Plasma instructions
herzenschein Oct 3, 2020
0d7c1f6
Merge pull request #14 from herzenschein/patch-2
osleg Oct 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,7 @@ fabric.properties
# Editor-based Rest Client
.idea/httpRequests

# LSP stuff
.ccls*
.clangd

20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: c
compiler: gcc
os: linux
dist: xenial
before_install:
- docker build -t builder -f build.Dockerfile .
script:
- docker run --rm --device /dev/input -v /run/udev/data:/run/udev/data -v $(pwd):/workdir
-w /workdir -it builder cmake .
- docker run --rm --device /dev/input -v /run/udev/data:/run/udev/data -v $(pwd):/workdir
-w /workdir -it builder make
deploy:
provider: releases
file: "gebaard"
skip_cleanup: true
on:
repo: Coffee2CodeNL/gebaar-libinput
tags: true
api_key:
secure: cocUFpTCvgEjAZzj5EC9iglQ4j1zx71a+U4aPLVUgNQNsFCZusSU//4ZEEwh1uYkJnnoxfhooRhAdgyMaWJs9Uvj7lgxk3dmHkc5f/p6iTFVH1lhPz06BT1tZkWzMkxLFilX8o53xl18qIiGBhgWGvqc5jFCFPrMALphql3qNrI0L/ZZRgU6FP7sXMU4LIomcIUsXKhDUZdRnrDZ3TIYaCrHSZEvLHPPlbYEVHncdmWFoZBjLMQ/M+i0cOgTHybxA6vlyLzA7zoMSGBgM7jDPDE6UN275PJenHT04gn6b9E3Ye6KLqhO/NZWseWfMZkQAnR1HJ6SswpF45nqLoMpjhEjQ5stJKe2dEIbsoeTEjfJgY5usOzh9UBawp+5SyuXYTMGHyaYpJM5w55KQv4bkecQm0yLVg4GBD852lEN2YuWkoteRH+3NYRR2l+Y/xsGKLAxJS4LoO+Jocf6ZUDjhrAyec2bxztQE7VGko2ndwC7nWPO6W8YfWfvgc08lqux5cYJjPE6Jj4fwrxMFhQ03eREcK8iYGHXs4kRTEv8Fj+Q0APFWIXVm6D2s9vPKPmzY84Q/Hq6B1gZKWwbsMOLUerRzsm6LtAxgg+vUQ3EIlknL2ciOkjHtWItkM6kl3txfalrf8TDl+mSTKnLpj2ZO5NxfdXC0aC7AZFGNhn+zSM=
70 changes: 65 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Click to join: [![Discord](https://img.shields.io/discord/548978799136473106.svg
14. Reboot and see the magic

```toml
[commands.swipe.three]
[swipe.commands.three]
left_up = ""
right_up = ""
up = ""
Expand All @@ -46,7 +46,7 @@ down = ""
left = ""
right = ""

[commands.swipe.four]
[swipe.commands.four]
left_up = ""
right_up = ""
up = ""
Expand All @@ -55,8 +55,26 @@ right_down = ""
down = ""
left = ""
right = ""

[pinch.commands]
in = ""
out = ""

[pinch.settings]
threshold = 0.25
one_shot = false


[swipe.settings]
threshold = 0.5
one_shot = true
trigger_on_release = false
```

* `pinch.settings.threshold` key sets the distance between fingers where it shold trigger.
Defaults to `0.25` which means fingers should travel exactly 25% distance from their initial position.
* `swipe.settings.threshold` sets the limit when swipe gesture should be executed. Defaults to 0.5.

### Repository versions

![](https://img.shields.io/aur/version/gebaar.svg?style=flat)
Expand All @@ -67,7 +85,7 @@ right = ""

_~/.config/gebaar/gebaard.toml_
```toml
[commands.swipe.three]
[swipe.commands.three]
left_up = ""
right_up = ""
up = "bspc node -f north"
Expand All @@ -77,7 +95,8 @@ down = "bspc node -f south"
left = "bspc node -f west"
right = "bspc node -f east"

[commands.swipe.four]

[swipe.commands.four]
left_up = ""
right_up = ""
up = "rofi -show combi"
Expand All @@ -86,16 +105,57 @@ right_down = ""
down = ""
left = "bspc desktop -f prev"
right = "bspc desktop -f next"

[pinch.commands.two]
in = "xdotool key Control_L+equal"
out = "xdotool key Control_L+minus"

[pinch.settings]
threshold=0.25
one_shot=false

[swipe.settings]
threshold = 0.5
one_shot = true
trigger_on_release = false
```

Add `gebaard -b` to `~/.config/bspwm/bspwmrc`

**KDE Plasma 5**

Any multiword value (like in some qdbus commands) must have escaped double quotes to work (`\"`).

Additionally, in some distros (like openSUSE), the `qdbus` command might be named `qdbus-qt5`.
Some navigation-related qdbus commands are provided directly by KWin and can be seen via `qdbus org.kde.KWin /KWin`,
but most shortcuts can be checked with `qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.shortcutNames`.

For Wayland users, a tool similar to `xdotool` in functionality is [ydotool](https://github.com/ReimuNotMoe/ydotool).

```toml
[swipe.commands.three]
up = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Switch One Desktop Up\""
down = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Switch One Desktop Down\""
left = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Switch One Desktop to the Left\""
right = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Switch One Desktop to the Right\""

[swipe.commands.four]
up = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Window Maximize\""
down = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Window Minimize\""
left = "xdotool key alt+Left"
right = "xdotool key alt+Right"
```

### State of the project

- [x] Receiving swipe events from libinput
- [ ] Receiving pinch/zoom events from libinput
- [x] Swipe gesture have trigger treshold
- [x] Receiving pinch/zoom events from libinput
- [x] Support continous pinch
- [ ] Support pinch-and-rotate gestures
- [ ] Receiving rotation events from libinput
- [x] Converting libinput events to motions
- [x] Running commands based on motions
- [x] Refactor code to be up to Release standards, instead of testing-hell


25 changes: 25 additions & 0 deletions assets/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Maintainer: Alex Zaslavsky <alex@wall-dev.org>

pkgname=gebaar-libinput
pkgver=0.1.4
pkgrel=1
pkgdesc='A Super Simple WM Independent Touchpad Gesture Daemon for libinput.'
arch=('x86_64')
url="https://github.com/Coffee2CodeNL/$pkgname"
license=('GPL3')
depends=('libinput')
conflicts=('gebaar')
provides=('gebaar')
source=('https://github.com/Coffee2CodeNL/gebaar-libinput/releases/download/v0.1.4/gebaard'
'https://raw.githubusercontent.com/Coffee2CodeNL/gebaar-libinput/master/LICENSE'
'https://raw.githubusercontent.com/Coffee2CodeNL/gebaar-libinput/master/README.md')
md5sums=('74efb11da5bb1714e114e6305d999186'
'SKIP'
'SKIP')


package() {
install -Dm755 gebaard "$pkgdir/usr/bin/gebaard"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
42 changes: 42 additions & 0 deletions assets/PKGBUILD.git
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Maintainer: Alex Zaslavsky <alex@wall-dev.org>

pkgname=gebaar-libinput-git
pkgver=r47.07b0ca8
pkgrel=1
pkgdesc='A Super Simple WM Independent Touchpad Gesture Daemon for libinput.'
arch=('x86_64')
url="https://github.com/Coffee2CodeNL/gebaar-libinput"
license=('GPL3')
depends=('libinput')
makedepends=('cmake' 'git')
conflicts=('gebaar')
provides=('gebaar')
source=('git+https://github.com/Coffee2CodeNL/gebaar-libinput')
md5sums=('SKIP')


pkgver() {
cd "$srcdir/gebaar-libinput"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
cd $srcdir/gebaar-libinput
git submodule init
git submodule update
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX="/usr" ..
}

build() {
cd $srcdir/gebaar-libinput/build
make -j$(nproc)
}

package() {
cd $srcdir/gebaar-libinput/build
make DESTDIR="$pkgdir" install/strip
cd ..
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
File renamed without changes.
10 changes: 10 additions & 0 deletions assets/gebaard.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Gebaar Daemon
Documentation=https://github.com/Coffee2CodeNL/gebaar-libinput

[Service]
ExecStart=/usr/local/bin/gebaard
Restart=always

[Install]
WantedBy=multi-user.target
7 changes: 7 additions & 0 deletions build.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM debian:stretch

RUN set -ex; \
echo 'deb http://http.us.debian.org/debian/ testing non-free contrib main' > /etc/apt/sources.list.d/debian-testing.list; \
apt-get update -q; \
apt-get install -y git gcc-8 curl make cmake build-essential libinput-dev zlib1g-dev libinput-tools libsystemd-dev

Loading