[PATCH] gnu: Add touchegg.

  • Done
  • quality assurance status badge
Details
3 participants
  • Julien Lepiller
  • Maxime Devos
  • Rene Saavedra
Owner
unassigned
Submitted by
Rene Saavedra
Severity
normal

Debbugs page

Rene Saavedra wrote 3 years ago
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
L6NN4nckg3RjiT_mmJGG2L3bRKBOeJijnKl_GAG7jHoCPggBAc7ZkMrbjFMX4tOd7l2-Jvyk_8CaOpvNwDLmvJZC5GBkisJz1CjBEmmmbNE=@protonmail.com
hello,

I share this package, I think (gnu/packages/toys.scm), it is a good place to live; but i can change it.

Cheers

--
Rene
From 655752f753facd039baae62ac06f9f55d8c50b1c Mon Sep 17 00:00:00 2001
From: Rene Saavedra <nanuui@protonmail.com>
Date: Mon, 2 May 2022 19:50:37 -0500
Subject: [PATCH] gnu: Add touchegg.

* gnu/packages/toys.scm (touchegg): New variable.
---
gnu/packages/toys.scm | 52 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (83 lines)
diff --git a/gnu/packages/toys.scm b/gnu/packages/toys.scm
index 09426fe6fa..a3b127444c 100644
--- a/gnu/packages/toys.scm
+++ b/gnu/packages/toys.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2019, 2020, 2021 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2022 Rene Saavedra <nanuui@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,8 @@ (define-module (gnu packages toys)
#:use-module (gnu packages)
#:use-module (gnu packages bison)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
#:use-module (gnu packages man)
#:use-module (gnu packages ncurses)
@@ -32,6 +35,7 @@ (define-module (gnu packages toys)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system cmake)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -331,3 +335,51 @@ (define-public cbonsai
(description "Cbonsai is a bonsai tree generator using ASCII art. It
creates, colors, and positions a bonsai tree, and is configurable.")
(license license:gpl3+)))
+
+(define-public touchegg
+ (package
+ (name "touchegg")
+ (version "2.0.14")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JoseExposito/touchegg")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0shvslz0c8nqx5f988z55qjc9xw0in9rb7b19r6vr1f7cdkqb6yr"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; No tests exist
+ #:configure-flags
+ (list "-DUSE_SYSTEMD=OFF") ; No systemd
+ #:phases
+ (modify-phases %standard-phases
+ ;; gnome-shell launch touchegg binary on startup and
+ ;; touchegg requires root privileges for proper functioning.
+ (add-after 'unpack 'disable-autostart
+ (lambda _
+ (substitute* "installation/touchegg.desktop"
+ (("Exec=touchegg")
+ "Exec=false")))))))
+ (native-inputs
+ (list
+ pkg-config))
+ (inputs
+ (list
+ cairo
+ gtk+
+ libgudev
+ libinput
+ libxrandr
+ libxtst
+ pugixml))
+ (home-page "https://github.com/JoseExposito/touchegg")
+ (synopsis "Linux multi-touch gesture recognizer")
+ (description
+ "Touchégg is an application that runs in the background and transform the
+gestures you make on your touchpad or touchscreen into visible actions in your
+desktop. Touchégg only works on X11 and use libinput to communicate with
+hardware.")
+ (license license:gpl3+)))
--
2.34.0
Maxime Devos wrote 3 years ago
5a4692cb2ee05aba388724a634936a6a629da904.camel@telenet.be
Toggle quote (2 lines)
> + diff --git a/gnu/packages/toys.scm b/gnu/packages/toys.scm

Doesn't look like a toy to me.

Rene Saavedra via Guix-patches via schreef op di 03-05-2022 om 01:01
[+0000]:
Toggle quote (9 lines)
> +         ;; gnome-shell launch touchegg binary on startup and
> +         ;; touchegg requires root privileges for proper
> functioning.
> +         (add-after 'unpack 'disable-autostart
> +           (lambda _
> +             (substitute* "installation/touchegg.desktop"
> +               (("Exec=touchegg")
> +                "Exec=false")))))))

What does it need root for?

Toggle quote (2 lines)
> + (synopsis "Linux multi-touch gesture recognizer")

Is it Linux-specific? Also, does it work in a pure environment (./pre-
inst-env guix shell --pure touchegg -- touchegg)?

Toggle quote (2 lines)
> use libinput to communicate with +hardware.")

The exact library used seems like an implementation detail to me.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnKE6hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sVTAP40LCxeNScFH0rT+m+1JxiyFKQx
iMAdWeqkRvRzXuFDSAD+J5rMkxjaQLmDHeCXEYq2cZ7wO7z+ROiOTumnOY7MvQQ=
=NRuV
-----END PGP SIGNATURE-----


Rene Saavedra wrote 3 years ago
(address . 55235@debbugs.gnu.org)
XM9MMzn5dXqYw9ZTnFAHyAMPaXNLD9K_mFJMenpfkrClevP0ludOhw_At8zydjXSwU30V9ZnNkcw60jDwcHzGG-idCYHPtyjgJCrTbljsz0=@protonmail.com
hi Maxime,

Toggle quote (2 lines)
>
> Doesn't look like a toy to me.
moved to gnu/packages/linux.scm

Toggle quote (2 lines)
>
> What does it need root for?
touchegg --daemon requires to detect touchpad device.

Toggle quote (2 lines)
> Is it Linux-specific? Also, does it work in a pure environment (./pre-
> inst-env guix shell --pure touchegg -- touchegg)?
fixed synopsis.

don't work in a pure environment, see error:
--
rex@crash ~/dev/guix$ ./pre-inst-env guix shell --pure touchegg -- touchegg --daemon
Touchégg v2.0.14.
Starting Touchégg in daemon mode
Starting daemon server...
Generating D-Bus introspection data
Creating D-Bus server
Server started at address unix:abstract=touchegg
A list of detected compatible devices will be displayed below:
Warning: Error opening device /dev/input/event3
Warning: Error opening device /dev/input/event0
Warning: Error opening device /dev/input/event1
Warning: Error opening device /dev/input/event5
Warning: Error opening device /dev/input/event8
Warning: Error opening device /dev/input/event6
Warning: Error opening device /dev/input/event9
Warning: Error opening device /dev/input/event10
Warning: Error opening device /dev/input/event11
Warning: Error opening device /dev/input/event7
Warning: Error opening device /dev/input/event2
Warning: Error opening device /dev/input/event4
--

Toggle quote (2 lines)
>
> The exact library used seems like an implementation detail to me.
description fixed.

Cheers
--
Rene
From 81a71a1cad5bd86acfbb6751a92e3dfd0a579591 Mon Sep 17 00:00:00 2001
From: Rene Saavedra <nanuui@protonmail.com>
Date: Sat, 7 May 2022 16:39:20 -0500
Subject: [PATCH] gnu: Add touchegg.

* gnu/packages/linux.scm (touchegg): New variable.
---
gnu/packages/linux.scm | 49 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (73 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9bb2314ebd..272fd23db0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -61,6 +61,7 @@
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022 Rene Saavedra <nanuui@protonmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -110,6 +111,7 @@ (define-module (gnu packages linux)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages golang)
#:use-module (gnu packages gperf)
@@ -9179,3 +9181,50 @@ (define-public libtree
"This tool turns @command{ldd} into a tree and explains how shared
libraries are found or why they cannot be located.")
(license license:expat)))
+
+(define-public touchegg
+ (package
+ (name "touchegg")
+ (version "2.0.14")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JoseExposito/touchegg")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0shvslz0c8nqx5f988z55qjc9xw0in9rb7b19r6vr1f7cdkqb6yr"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; No tests exist
+ #:configure-flags
+ (list "-DUSE_SYSTEMD=OFF") ; No systemd
+ #:phases
+ (modify-phases %standard-phases
+ ;; gnome-shell launch touchegg daemon on startup, touchegg daemon
+ ;; requires root privileges to detect touchpad or touchscreen device.
+ (add-after 'unpack 'disable-autostart
+ (lambda _
+ (substitute* "installation/touchegg.desktop"
+ (("Exec=touchegg")
+ "Exec=false")))))))
+ (native-inputs
+ (list
+ pkg-config))
+ (inputs
+ (list
+ cairo
+ gtk+
+ libgudev
+ libinput
+ libxrandr
+ libxtst
+ pugixml))
+ (home-page "https://github.com/JoseExposito/touchegg")
+ (synopsis "Multitouch gesture recognizer")
+ (description
+ "Touchégg is an application that runs in the background and transform the
+gestures you make on your touchpad or touchscreen into visible actions in your
+desktop.")
+ (license license:gpl3+)))
--
2.34.0
Maxime Devos wrote 3 years ago
fab733876e11cf1b8cb97523813d43ba8e19a8b9.camel@telenet.be
Rene Saavedra via Guix-patches via schreef op za 07-05-2022 om 21:53
[+0000]:
Toggle quote (10 lines)
> > Is it Linux-specific? Also, does it work in a pure environment
> (./pre-
> > inst-env guix shell --pure touchegg -- touchegg)?
> fixed synopsis.
>
> don't work in a pure environment, see error:
> --
> rex@crash ~/dev/guix$ ./pre-inst-env guix shell --pure touchegg --
> touchegg --daemon

That's the daemon, which apparently requires root whereas you're
running it as non-root (see Error opening device. Try

(not sure if the -E is
$ ./pre-inst-env guix shell --pure touchegg -- sudo -E touchegg --daemon

and

$ ./pre-inst-env guix shell --pure touchegg -- touchegg

instead.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYneiOxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qEIAP9V9YlRBZaJKkvEnx93CRx77dWp
YhjvgumOkRMu5QS90QD9HDkwz8n5zTS3bd69FSP/uSQ6EvqF5j7RZB6pCXkoww4=
=Mofl
-----END PGP SIGNATURE-----


Rene Saavedra wrote 3 years ago
(address . 55235@debbugs.gnu.org)
WiquWt43JPEKNq6VkU78ctBh4knWpqbGT4UeGFGO-BSG_QMFc8CtKUu36snh0U0mZys1NuXhg18XkEbOQJGlj4eZYowtQtUFKVbHNFLBrLk=@protonmail.com
Hi Maxime,

Toggle quote (6 lines)
> That's the daemon, which apparently requires root whereas you're
> running it as non-root (see Error opening device. Try
>
> (not sure if the -E is
> $ ./pre-inst-env guix shell --pure touchegg -- sudo -E touchegg --daemon

rex@crash ~/dev/guix$ ./pre-inst-env guix shell --pure touchegg -- $(sudo touchegg --daemon)

Toggle quote (1 lines)
> $ ./pre-inst-env guix shell --pure touchegg -- touchegg
--
rex@crash ~/dev/guix$ ./pre-inst-env guix shell --pure touchegg -- touchegg
Touchégg v2.0.14.
Starting Touchégg in client mode
Parsing your configuration file...
Using configuration file "/home/rex/.config/touchegg/touchegg.conf"
Configuration parsed successfully
Connecting to Touchégg daemon...
Connection with Touchégg established
--

With this, touchegg works in a pure environment!.


Cheers
--
Rene
Rene Saavedra wrote 3 years ago
(address . 55235@debbugs.gnu.org)
uwVWXqvn6bDVnHP2otmYn3HNdIQR6nfJ0ZwhzC1sEtRPjgYMlincobgm-6qbgtmYhv36mEmTH-mlWLlirbW1XlEOhQnuekqafCwiR7dB7zw=@protonmail.com
Hi Maxime,

I will send an updated version of the package that works with a Shepherd service.


Cheers
--
Rene
Rene Saavedra wrote 3 years ago
(address . 55235@debbugs.gnu.org)
2qM0dQLMorblMzkWu4bOu8DZt2npNzfY9LN5Uh3Gbx82PczvoMoXpLLevtCATk4tAm7k67gTWCjgxvKF31UyMg_9EzX_KtJH8xwwNa-bpkM=@protonmail.com
Hi,

Toggle quote (3 lines)
> I will send an updated version of the package that works with a Shepherd service.
>

Attached the updated version of the package, I did tests executing Touchegg as a service (which I will send in another mail, WIP).


--
Rene
From d05652739c98e0b25f73284cb286620102ab51ba Mon Sep 17 00:00:00 2001
From: Rene Saavedra <nanuui@protonmail.com>
Date: Fri, 20 May 2022 13:30:09 -0500
Subject: [PATCH] gnu: Add touchegg.

* gnu/packages/linux.scm (touchegg): New variable.
---
gnu/packages/linux.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e179a5c2f7..38fa06e98b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -61,6 +61,7 @@
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022 Rene Saavedra <nanuui@protonmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -110,6 +111,7 @@ (define-module (gnu packages linux)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages golang)
#:use-module (gnu packages gperf)
@@ -9187,3 +9189,41 @@ (define-public libtree
"This tool turns @command{ldd} into a tree and explains how shared
libraries are found or why they cannot be located.")
(license license:expat)))
+
+(define-public touchegg
+ (package
+ (name "touchegg")
+ (version "2.0.14")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JoseExposito/touchegg")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0shvslz0c8nqx5f988z55qjc9xw0in9rb7b19r6vr1f7cdkqb6yr"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; No tests exist
+ #:configure-flags
+ (list "-DUSE_SYSTEMD=OFF"))) ; No systemd
+ (native-inputs
+ (list
+ pkg-config))
+ (inputs
+ (list
+ cairo
+ gtk+
+ libgudev
+ libinput
+ libxrandr
+ libxtst
+ pugixml))
+ (home-page "https://github.com/JoseExposito/touchegg")
+ (synopsis "Multitouch gesture recognizer")
+ (description
+ "Touchégg is an application that runs in the background and transform the
+gestures you make on your touchpad or touchscreen into visible actions in your
+desktop.")
+ (license license:gpl3+)))
--
2.36.0
Julien Lepiller wrote 3 years ago
20220604175638.61e7cc8b@sybil.lepiller.eu
Le Fri, 20 May 2022 18:39:05 +0000,
Rene Saavedra via Guix-patches via <guix-patches@gnu.org> a écrit :

Toggle quote (12 lines)
> Hi,
>
> > I will send an updated version of the package that works with a
> > Shepherd service.
>
> Attached the updated version of the package, I did tests executing
> Touchegg as a service (which I will send in another mail, WIP).
>
>
> --
> Rene

Hi Rene,

pushed to master as 28274a353d3618784a4035e928db688f0664aa8c, thank you!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 55235@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 55235
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help