From patchwork Wed Jan 12 21:03:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 36283 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 31C8527BBEA; Wed, 12 Jan 2022 21:06:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A62CF27BBE9 for ; Wed, 12 Jan 2022 21:06:53 +0000 (GMT) Received: from localhost ([::1]:53754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7kpY-0002fG-Ps for patchwork@mira.cbaines.net; Wed, 12 Jan 2022 16:06:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7kmo-0000FO-Cl for guix-patches@gnu.org; Wed, 12 Jan 2022 16:04:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7kmo-0008Mn-2j for guix-patches@gnu.org; Wed, 12 Jan 2022 16:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n7kmn-0006YC-TK for guix-patches@gnu.org; Wed, 12 Jan 2022 16:04:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53222] [PATCH] gnu: Add autokey. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Jan 2022 21:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53222 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53222@debbugs.gnu.org Cc: "~whereiseveryone/guixrus@lists.sr.ht" <~whereiseveryone/guixrus@lists.sr.ht> X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.164202140925135 (code B ref -1); Wed, 12 Jan 2022 21:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jan 2022 21:03:29 +0000 Received: from localhost ([127.0.0.1]:59261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7kmB-0006XD-5X for submit@debbugs.gnu.org; Wed, 12 Jan 2022 16:03:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:51120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7km6-0006X2-Tx for submit@debbugs.gnu.org; Wed, 12 Jan 2022 16:03:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7km6-00084W-OY for guix-patches@gnu.org; Wed, 12 Jan 2022 16:03:18 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:16025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7km0-00087t-Au for guix-patches@gnu.org; Wed, 12 Jan 2022 16:03:18 -0500 Date: Wed, 12 Jan 2022 21:03:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1642021382; bh=BO1SO8GL9USrhILeQP9c/wPniXXv7lX8PAVkEHMq/1c=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:From:To:Cc; b=KapIcOlhLrx3vZXuiO1fQugI9MJRKw7C7C3BJsVGlbrY/Q37ffMgqGanxTK+BYwEz Z/g/aS5f6fUIfuRYFjj1ERu0tep9TxHaESjfwh9KL0iLwHfZDCACeETgutG9wxa5RE dN5psiLcFf5VyC7meLPbjtnl+vHWMD9BB43phAmEvUgvpfgorN3wq7tsnglaDBlEaK 2lbmjx8M8Fes29YFWCwxR1n1ohyfo1JBYQ9bmWrSbABykwGm+3JeqPztf+p/lxNydj RPvsJMMAwrbbUiBgTTufc7WObAeo4/rKDJijI2y2/jaQj7N6n6eNEtD0PfWJ640gwQ LtmzljoNeJlDw== Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.133; envelope-from=john.kehayias@protonmail.com; helo=mail-40133.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias X-getmail-retrieved-from-mailbox: Patches Hello, Here is a patch for autokey, a python based program for things like keyboard shortcuts and text expansion. I find it invaluable for having emacs-like keys everywhere. It includes both a gtk and qt frontend; after discussion on IRC I decided against trying to split them. Since it is one package and it is built together, it is a bit tricky I think to disentangle the code and paths needed for each. In my first attempts it didn't reduce the closure and needed a lot of manual work. Possibly it could work with more effort, but since this is used as a GUI tool primarily, the GTK/QT packages shouldn't be adding anything new. John From 419a8587d6101b8ac48922ff06d75ecd405e16e9 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 12 Jan 2022 15:51:17 -0500 Subject: [PATCH] gnu: Add autokey. * gnu/packages/python-xyz.scm (autokey): New variable. --- gnu/packages/python-xyz.scm | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 4df794eb60..b85232f2b7 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -114,6 +114,7 @@ ;;; Copyright © 2021 ZmnSCPxj ;;; Copyright © 2021 Filip Lajszczak ;;; Copyright © 2021 Greg Hogan +;;; Copyright © 2022 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -4180,6 +4181,67 @@ (define-public python-anytree structure for Python.") (license license:asl2.0))) +(define-public autokey + (package + (name "autokey") + (version "0.95.10") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/autokey/autokey") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0f0cqfnb49wwdy7zl2f2ypcnd5pc8r8n7z7ssxkq20d4xfxlgamr")))) + (build-system python-build-system) + (arguments + (list + #:tests? #f ; Tests are deprecated/broken until next version. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "lib/autokey/scripting.py" + (("\"wmctrl\"") + (string-append "\"" (search-input-file inputs "bin/wmctrl") "\"")) + (("\"zenity\"") + (string-append "\"" (search-input-file inputs "bin/zenity") "\""))))) + (add-after 'install 'wrap-autokey + (lambda _ + (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH"))) + (for-each + (lambda (program) + (wrap-program program + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) + (map (lambda (name) + (string-append #$output "/bin/" name)) + '("autokey-gtk" + "autokey-shell"))))))))) + (inputs + (list bash-minimal ; for wrap-program + gtksourceview-3 + libappindicator + libnotify + wmctrl + zenity)) + (propagated-inputs + (list python-dbus + python-pygobject + python-pyinotify + python-pyqt+qscintilla + python-xlib)) + (home-page "https://github.com/autokey/autokey") + (synopsis + "Keyboard and GUI automation utility") + (description + "AutoKey is a desktop automation utility for X11. It allows the automation of +virtually any task by responding to typed abbreviations and hotkeys. It +offers a full-featured GUI (GTK and QT versions) that makes it highly +accessible for novices, as well as a scripting interface offering the full +flexibility and power of the Python language.") + (license license:gpl3+))) + (define-public python-docutils (package (name "python-docutils") -- 2.34.0