Skip to content

Commit ce8ca61

Browse files
committed
Release v0.0.2 for to CMake fixes
2 parents 2d8e294 + 7c83852 commit ce8ca61

File tree

5 files changed

+82
-12
lines changed

5 files changed

+82
-12
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "libs/cxxopts"]
22
path = libs/cxxopts
3-
url = git@github.com:jarro2783/cxxopts.git
3+
url = https://github.com/jarro2783/cxxopts
44
[submodule "libs/cpptoml"]
55
path = libs/cpptoml
6-
url = git@github.com:skystrife/cpptoml.git
6+
url = https://github.com/skystrife/cpptoml

.idea/vcs.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
cmake_minimum_required(VERSION 3.13)
1+
cmake_minimum_required(VERSION 3.12.1)
22
project(gebaar)
3-
set(CMAKE_VERBOSE_MAKEFILE on)
43
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
54
set(CMAKE_CXX_STANDARD 17)
65
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
76

8-
add_executable(gebaard src/main.cpp src/io/input.cpp src/io/input.h src/config/config.cpp src/config/config.h src/daemonizer.cpp src/daemonizer.h)
7+
add_executable(gebaard
8+
src/main.cpp
9+
src/io/input.cpp
10+
src/io/input.h
11+
src/config/config.cpp
12+
src/config/config.h
13+
src/daemonizer.cpp
14+
src/daemonizer.h)
915

1016
find_package(PkgConfig)
1117
if (PKG_CONFIG_FOUND)
1218
pkg_search_module(LIBINPUT REQUIRED libinput)
1319
endif ()
1420

1521
find_package(udev)
16-
find_package(spdlog)
1722

1823
target_link_libraries(gebaard ${LIBINPUT_LIBRARIES} ${UDEV_LIBRARIES} stdc++fs)
1924
target_include_directories(gebaard PUBLIC ${LIBINPUT_INCLUDE_DIRS} ${UDEV_INCLUDE_DIRS} libs/cxxopts/include libs/cpptoml/include)
2025
target_compile_options(gebaard PUBLIC ${LIBINPUT_CFLAGS_OTHER} ${UDEV_CFLAGS_OTHER})
26+
27+
install(TARGETS gebaard DESTINATION bin)

README.md

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,81 @@
11
Gebaar
22
=========
3+
[![Gitter chat](https://badges.gitter.im/gebaar-libinput/community.png)](https://gitter.im/gebaar-libinput/community)
34

4-
WM Independent Gesture Daemon for libinput
5+
WM Independent Touchpad Gesture Daemon for libinput
56

67
_Gebaar means Gesture in Dutch_
78

9+
Run any command by simply gesturing on your touchpad!
10+
11+
### What makes this different over the other implementations?
12+
13+
[libinput-gestures](https://github.com/bulletmark/libinput-gestures) and [fusuma](https://github.com/iberianpig/fusuma) both parse the output of the shell command `libinput debug-events` which is an unstable API and the output just keeps coming, so it'll eat (some) RAM.
14+
15+
Gebaar directly interfaces with libinput to receive and react to the events.
16+
This is more stable, faster, and more efficient as it **does not parse the output of a program** like the aforementioned projects do.
17+
18+
19+
### How to build and install
20+
21+
1. Clone the repository via `git clone https://github.com/Coffee2CodeNL/gebaar-libinput`
22+
2. Check out the latest version (`git checkout v0.0.1`)
23+
3. Run `git submodule update --init` in the root folder
24+
4. Run `mkdir build && cd build`
25+
5. Run `cmake ..`
26+
6. Run `make -j$(nproc)`
27+
7. Run `sudo make install` to install
28+
8. Run `mkdir -p ~/.config/gebaar`
29+
9. Run `nano ~/.config/gebaar/gebaard.toml` (or vim, if you like it better)
30+
10. Add the snippet below to `gebaard.toml`
31+
11. Configure commands to run per direction
32+
12. Add yourself to the `input` group with `usermod -a -G input $USER`
33+
13. Run Gebaar via some startup file by adding `gebaard -b` to it
34+
14. Reboot and see the magic
35+
36+
```toml
37+
[commands.swipe.three]
38+
up = ""
39+
down = ""
40+
left = ""
41+
right = ""
42+
43+
[commands.swipe.four]
44+
up = ""
45+
down = ""
46+
left = ""
47+
right = ""
48+
```
49+
50+
51+
52+
### Examples
53+
54+
**bspwm**
55+
56+
_~/.config/gebaar/gebaard.toml_
57+
```toml
58+
[commands.swipe.three]
59+
up = "bspc node -f north"
60+
down = "bspc node -f south"
61+
left = "bspc node -f west"
62+
right = "bspc node -f east"
63+
64+
[commands.swipe.four]
65+
up = "rofi -show combi"
66+
down = ""
67+
left = "bspc desktop -f prev"
68+
right = "bspc desktop -f next"
69+
```
70+
71+
Add `gebaard -b` to `~/.config/bspwm/bspwmrc`
72+
873
### State of the project
974

1075
- [x] Receiving swipe events from libinput
1176
- [ ] Receiving pinch/zoom events from libinput
1277
- [ ] Receiving rotation events from libinput
1378
- [x] Converting libinput events to motions
14-
- [ ] Running commands based on motions
15-
- [ ] Refactor code to be up to Release standards, instead of testing-hell
16-
17-
### Screenshots of debug/testing output
79+
- [x] Running commands based on motions
80+
- [x] Refactor code to be up to Release standards, instead of testing-hell
1881

19-
![gestures](doc/swipes.png)

doc/swipes.png

-117 KB
Binary file not shown.

0 commit comments

Comments
 (0)