Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple execution of commands #296

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

MidnightNerd
Copy link

@MidnightNerd MidnightNerd commented Mar 24, 2021

Hello,
this code should allow users to execute code multiple times when making a swipe gesture.

There are some things that need to be mentioned:
1. CPU load is slightly higher than in previous version. The impact on battery life isn't notable on modern machines.
2. The config file must specify the number of fingers. The config syntax is: gesture swipe direction numFingers Threshold command.
-->Maybe its better to add a new command for the config file.
3. The command will be executed one time more at the end of the gesture. (this is fixed)

Edit: here are two example configuration lines to try this feature(Volume control):
#Swipe with 4 fingers up or down to increase/decrease Volume
timeout 5
gesture swipe up 4 40 xdotool key XF86AudioRaiseVolume
gesture swipe down 4 40 xdotool key XF86AudioLowerVolume

@MidnightNerd
Copy link
Author

Maybe this is not really clear:
This Patch is not for executing a specific command at the end of a swipe gesture multiple times,
this Patch executes a command while the gesture is done.

@solarfl4re
Copy link

solarfl4re commented Nov 1, 2021

I merged @MidnightNerd's code into the latest master on my Arch machine and installed it. Swipe to adjust volume works perfectly - thanks, @MidnightNerd!

For other Arch users, I modified the libinput-gestures PKGBUILD from AUR to use the local git repo where I merged MidnightNerd's code into the latest master:

3c3
< pkgver=2.62
---
> pkgver=2.70
15c15
< source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
---
>   source=("git+file:///home/david/repos/libinput-gestures/src/$pkgname")
17c17
< md5sums=('03fcc64ffc0150ea6ddefb1f4af85edd')
---
> md5sums=('SKIP')
20c20
<   cd "$pkgname-$pkgver"
---
>   cd "$pkgname"

@jujuscream
Copy link

THANK YOU!

Finally got around to trying this vs. the old one. This works perfectly and it's exactly what I wanted!

@nikelborm
Copy link

Why is this pull request still opened if it was merged?

@MidnightNerd
Copy link
Author

i do not have much experience with git. As far as i can see the code wasn't merged.

@nikelborm
Copy link

Screenshot from 2023-02-26 18-13-09

Oh, I just misinterpreted this

@a7n007
Copy link

a7n007 commented Feb 26, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants