From unknown Fri Aug 15 18:12:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39922] [PATCH] Add clipnotify and clipmenu Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Mar 2020 10:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39922 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39922@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158340395418876 (code B ref -1); Thu, 05 Mar 2020 10:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Mar 2020 10:25:54 +0000 Received: from localhost ([127.0.0.1]:42205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9nhS-0004uO-Gs for submit@debbugs.gnu.org; Thu, 05 Mar 2020 05:25:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:53704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9nhQ-0004uG-Fb for submit@debbugs.gnu.org; Thu, 05 Mar 2020 05:25:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44105) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9nhO-0007x8-SY for guix-patches@gnu.org; Thu, 05 Mar 2020 05:25:52 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9nhN-0006IO-Ct for guix-patches@gnu.org; Thu, 05 Mar 2020 05:25:50 -0500 Received: from mail.choca.pics ([2001:910:1410:500::1]:40546) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9nhN-00067O-2S for guix-patches@gnu.org; Thu, 05 Mar 2020 05:25:49 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 9AA1B181929C9 for ; Thu, 5 Mar 2020 11:25:38 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id aBJlfIehOE8h for ; Thu, 5 Mar 2020 11:25:37 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 1F7A4181929CF for ; Thu, 5 Mar 2020 11:25:37 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id VW9PSfdM5LWz for ; Thu, 5 Mar 2020 11:25:36 +0100 (CET) Received: from luz4 (lfbn-ren-1-1414-74.w90-27.abo.wanadoo.fr [90.27.133.74]) by mail.choca.pics (Postfix) with ESMTPSA id D92D5181929C9 for ; Thu, 5 Mar 2020 11:25:36 +0100 (CET) From: Damien Cassou Date: Thu, 05 Mar 2020 11:25:35 +0100 Message-ID: <87wo7zhzds.fsf@cassou.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:910:1410:500::1 X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --=-=-= Content-Type: text/plain Here are 2 more packages, clipnotify and clipmenu. The latter depends on the former. If you want to teach me how to properly package for Guix, now is the good time. -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-clipnotify.patch >From f6f5ed7f4d5ba8a75f8783a7958b6f73d43644dd Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Wed, 4 Mar 2020 16:31:51 +0100 Subject: [PATCH 1/2] gnu: Add clipnotify. * gnu/packages/xdisorg.scm (clipnotify): New variable. --- gnu/packages/xdisorg.scm | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index dd05caa5f0..6bdcfcbf76 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -2116,3 +2116,49 @@ font and theme settings when a complete desktop environment (GNOME, KDE) is not running. With a simple @file{.xsettingsd} configuration file one can avoid configuring visual settings in different UI toolkits separately.") (license license:bsd-3))) + +(define-public clipnotify + (package + (name "clipnotify") + (version "1.0.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cdown/clipnotify.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1v3ydm5ljy8z1savmdxrjyx7a5bm5013rzw80frp3qbbjaci0wbg")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append %output "/share/doc/" ,name "-" ,version))) + (install-file "clipnotify" bin) + (install-file "README.md" doc))))) + #:make-flags (list "CC=gcc") + #:tests? #f)) + (inputs + `(("libx11" ,libx11) + ("libXfixes" ,libxfixes))) + (home-page "https://github.com/cdown/clipnotify") + (synopsis "Notify on new X clipboard events") + (description "@command{clipnotify} is a simple program that, using the +XFIXES extension to X11, waits until a new selection is available and then +exits. + +It was primarily designed for clipmenu, to avoid polling for new selections. + +@command{clipnotify} doesn't try to print anything about the contents of the +selection, it just exits when it changes. This is intentional -- X11's +selection API is verging on the insane, and there are plenty of others who +have already lost their sanity to bring us xclip/xsel/etc. Use one of those +tools to complement clipnotify.") + (license license:public-domain))) -- 2.24.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-Add-clipmenu.patch >From 6d3202131236adc7f5c38e07541382d04ac68cf1 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Thu, 5 Mar 2020 08:26:23 +0100 Subject: [PATCH 2/2] gnu: Add clipmenu. * gnu/packages/xdisorg.scm (clipmenu): New variable. --- gnu/packages/xdisorg.scm | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 6bdcfcbf76..f2d94d4039 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -2162,3 +2162,61 @@ selection API is verging on the insane, and there are plenty of others who have already lost their sanity to bring us xclip/xsel/etc. Use one of those tools to complement clipnotify.") (license license:public-domain))) + +(define-public clipmenu + (let ((commit "a495bcc7a4ab125182a661c5808364f66938a87c") + (revision "1")) + (package + (name "clipmenu") + (version (string-append "5.6.0-" + revision "." (string-take commit 7))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cdown/clipnotify.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "12vvircdhl4psqi51cnfd6bqy85v2vwfcmdq1mimjgng727nwzys")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-hardcoded-paths + (lambda _ + (substitute* "clipmenud" + (("has_clipnotify=0") "has_clipnotify=1") + (("command -v clipnotify >/dev/null 2>&1 && has_clipnotify=1") "") + (("clipnotify \\|\\| .*") (string-append (which "clipnotify") "\n")) + (("xsel --logfile") (string-append (which "xsel") " --logfile"))) + (substitute* "clipmenu" + (("xsel --logfile") (string-append (which "xsel") " --logfile"))) + #t)) + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append %output "/share/doc/" ,name "-" ,version))) + (install-file "clipdel" bin) + (install-file "clipmenu" bin) + (install-file "clipmenud" bin) + (install-file "README.md" doc))))) + #:tests? #f)) + (inputs + `(("clipnotify" ,clipnotify) + ("xsel" ,xsel))) + (home-page "https://github.com/cdown/clipmenu") + (synopsis "Simple clipboard manager using dmenu or rofi and xsel") + (description "Start @command{clipmenud}, then run @command{clipmenu} to +select something to put on the clipboard. + +When @command{clipmenud} detects changes to the clipboard contents, it writes +them out to the cache directory. @command{clipmenu} reads the cache directory +to find all available clips and launches @command{dmenu} (or @command{rofi}, +depending on the value of @code{CM_LAUNCHER}) to let the user select a clip. +After selection, the clip is put onto the PRIMARY and CLIPBOARD X selections.") + (license license:public-domain)))) -- 2.24.1 --=-=-=-- From unknown Fri Aug 15 18:12:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Damien Cassou Subject: bug#39922: closed (Re: [bug#39922] [PATCH] Add clipnotify and clipmenu) Message-ID: References: <878sk6hjlc.fsf@gnu.org> <87wo7zhzds.fsf@cassou.me> X-Gnu-PR-Message: they-closed 39922 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 39922@debbugs.gnu.org Date: Wed, 11 Mar 2020 17:45:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1583948701-21017-1" This is a multi-part message in MIME format... ------------=_1583948701-21017-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39922: [PATCH] Add clipnotify and clipmenu which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39922@debbugs.gnu.org. --=20 39922: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39922 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1583948701-21017-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39922-done) by debbugs.gnu.org; 11 Mar 2020 17:44:57 +0000 Received: from localhost ([127.0.0.1]:55487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jC5Pc-0005Sb-Ne for submit@debbugs.gnu.org; Wed, 11 Mar 2020 13:44:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jC5Pb-0005SP-Dl for 39922-done@debbugs.gnu.org; Wed, 11 Mar 2020 13:44:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jC5PV-0001yl-NU; Wed, 11 Mar 2020 13:44:49 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=39052 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jC5PV-0008Oz-Aq; Wed, 11 Mar 2020 13:44:49 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Damien Cassou Subject: Re: [bug#39922] [PATCH] Add clipnotify and clipmenu References: <87wo7zhzds.fsf@cassou.me> Date: Wed, 11 Mar 2020 18:44:47 +0100 In-Reply-To: <87wo7zhzds.fsf@cassou.me> (Damien Cassou's message of "Thu, 05 Mar 2020 11:25:35 +0100") Message-ID: <878sk6hjlc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39922-done Cc: 39922-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Damien, Damien Cassou skribis: >>>From f6f5ed7f4d5ba8a75f8783a7958b6f73d43644dd Mon Sep 17 00:00:00 2001 > From: Damien Cassou > Date: Wed, 4 Mar 2020 16:31:51 +0100 > Subject: [PATCH 1/2] gnu: Add clipnotify. > > * gnu/packages/xdisorg.scm (clipnotify): New variable. Neat! I added a copyright line for you, let me know if anything=E2=80=99s wrong! > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (bin (string-append out "/bin")) > + (doc (string-append %output "/share/doc/" ,name "-"= ,version))) > + (install-file "clipnotify" bin) > + (install-file "README.md" doc))))) I added a #t here (by convention, phase have to return either #t or #f currently.) >>>From 6d3202131236adc7f5c38e07541382d04ac68cf1 Mon Sep 17 00:00:00 2001 > From: Damien Cassou > Date: Thu, 5 Mar 2020 08:26:23 +0100 > Subject: [PATCH 2/2] gnu: Add clipmenu. > > * gnu/packages/xdisorg.scm (clipmenu): New variable. [...] > + (modify-phases %standard-phases > + (add-after 'unpack 'fix-hardcoded-paths > + (lambda _ > + (substitute* "clipmenud" > + (("has_clipnotify=3D0") "has_clipnotify=3D1") > + (("command -v clipnotify >/dev/null 2>&1 && has_cl= ipnotify=3D1") "") > + (("clipnotify \\|\\| .*") (string-append (which "c= lipnotify") "\n")) > + (("xsel --logfile") (string-append (which "xsel") = " --logfile"))) > + (substitute* "clipmenu" > + (("xsel --logfile") (string-append (which "xsel") = " --logfile"))) I adjusted the indentation and line length here. > + (replace 'install > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (bin (string-append out "/bin")) > + (doc (string-append %output "/share/doc/" ,name "-"= ,version))) > + (install-file "clipdel" bin) > + (install-file "clipmenu" bin) > + (install-file "clipmenud" bin) > + (install-file "README.md" doc))))) and added #t here. > + #:tests? #f)) Oh, I overlooked that, but usually, when disabling tests, we add a comment explaining why. Thanks, Ludo=E2=80=99. ------------=_1583948701-21017-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Mar 2020 10:25:54 +0000 Received: from localhost ([127.0.0.1]:42205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9nhS-0004uO-Gs for submit@debbugs.gnu.org; Thu, 05 Mar 2020 05:25:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:53704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9nhQ-0004uG-Fb for submit@debbugs.gnu.org; Thu, 05 Mar 2020 05:25:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44105) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9nhO-0007x8-SY for guix-patches@gnu.org; Thu, 05 Mar 2020 05:25:52 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9nhN-0006IO-Ct for guix-patches@gnu.org; Thu, 05 Mar 2020 05:25:50 -0500 Received: from mail.choca.pics ([2001:910:1410:500::1]:40546) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9nhN-00067O-2S for guix-patches@gnu.org; Thu, 05 Mar 2020 05:25:49 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 9AA1B181929C9 for ; Thu, 5 Mar 2020 11:25:38 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id aBJlfIehOE8h for ; Thu, 5 Mar 2020 11:25:37 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 1F7A4181929CF for ; Thu, 5 Mar 2020 11:25:37 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id VW9PSfdM5LWz for ; Thu, 5 Mar 2020 11:25:36 +0100 (CET) Received: from luz4 (lfbn-ren-1-1414-74.w90-27.abo.wanadoo.fr [90.27.133.74]) by mail.choca.pics (Postfix) with ESMTPSA id D92D5181929C9 for ; Thu, 5 Mar 2020 11:25:36 +0100 (CET) From: Damien Cassou To: guix-patches@gnu.org Subject: [PATCH] Add clipnotify and clipmenu Date: Thu, 05 Mar 2020 11:25:35 +0100 Message-ID: <87wo7zhzds.fsf@cassou.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:910:1410:500::1 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --=-=-= Content-Type: text/plain Here are 2 more packages, clipnotify and clipmenu. The latter depends on the former. If you want to teach me how to properly package for Guix, now is the good time. -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-clipnotify.patch >From f6f5ed7f4d5ba8a75f8783a7958b6f73d43644dd Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Wed, 4 Mar 2020 16:31:51 +0100 Subject: [PATCH 1/2] gnu: Add clipnotify. * gnu/packages/xdisorg.scm (clipnotify): New variable. --- gnu/packages/xdisorg.scm | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index dd05caa5f0..6bdcfcbf76 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -2116,3 +2116,49 @@ font and theme settings when a complete desktop environment (GNOME, KDE) is not running. With a simple @file{.xsettingsd} configuration file one can avoid configuring visual settings in different UI toolkits separately.") (license license:bsd-3))) + +(define-public clipnotify + (package + (name "clipnotify") + (version "1.0.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cdown/clipnotify.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1v3ydm5ljy8z1savmdxrjyx7a5bm5013rzw80frp3qbbjaci0wbg")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append %output "/share/doc/" ,name "-" ,version))) + (install-file "clipnotify" bin) + (install-file "README.md" doc))))) + #:make-flags (list "CC=gcc") + #:tests? #f)) + (inputs + `(("libx11" ,libx11) + ("libXfixes" ,libxfixes))) + (home-page "https://github.com/cdown/clipnotify") + (synopsis "Notify on new X clipboard events") + (description "@command{clipnotify} is a simple program that, using the +XFIXES extension to X11, waits until a new selection is available and then +exits. + +It was primarily designed for clipmenu, to avoid polling for new selections. + +@command{clipnotify} doesn't try to print anything about the contents of the +selection, it just exits when it changes. This is intentional -- X11's +selection API is verging on the insane, and there are plenty of others who +have already lost their sanity to bring us xclip/xsel/etc. Use one of those +tools to complement clipnotify.") + (license license:public-domain))) -- 2.24.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-Add-clipmenu.patch >From 6d3202131236adc7f5c38e07541382d04ac68cf1 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Thu, 5 Mar 2020 08:26:23 +0100 Subject: [PATCH 2/2] gnu: Add clipmenu. * gnu/packages/xdisorg.scm (clipmenu): New variable. --- gnu/packages/xdisorg.scm | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 6bdcfcbf76..f2d94d4039 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -2162,3 +2162,61 @@ selection API is verging on the insane, and there are plenty of others who have already lost their sanity to bring us xclip/xsel/etc. Use one of those tools to complement clipnotify.") (license license:public-domain))) + +(define-public clipmenu + (let ((commit "a495bcc7a4ab125182a661c5808364f66938a87c") + (revision "1")) + (package + (name "clipmenu") + (version (string-append "5.6.0-" + revision "." (string-take commit 7))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cdown/clipnotify.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "12vvircdhl4psqi51cnfd6bqy85v2vwfcmdq1mimjgng727nwzys")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-hardcoded-paths + (lambda _ + (substitute* "clipmenud" + (("has_clipnotify=0") "has_clipnotify=1") + (("command -v clipnotify >/dev/null 2>&1 && has_clipnotify=1") "") + (("clipnotify \\|\\| .*") (string-append (which "clipnotify") "\n")) + (("xsel --logfile") (string-append (which "xsel") " --logfile"))) + (substitute* "clipmenu" + (("xsel --logfile") (string-append (which "xsel") " --logfile"))) + #t)) + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append %output "/share/doc/" ,name "-" ,version))) + (install-file "clipdel" bin) + (install-file "clipmenu" bin) + (install-file "clipmenud" bin) + (install-file "README.md" doc))))) + #:tests? #f)) + (inputs + `(("clipnotify" ,clipnotify) + ("xsel" ,xsel))) + (home-page "https://github.com/cdown/clipmenu") + (synopsis "Simple clipboard manager using dmenu or rofi and xsel") + (description "Start @command{clipmenud}, then run @command{clipmenu} to +select something to put on the clipboard. + +When @command{clipmenud} detects changes to the clipboard contents, it writes +them out to the cache directory. @command{clipmenu} reads the cache directory +to find all available clips and launches @command{dmenu} (or @command{rofi}, +depending on the value of @code{CM_LAUNCHER}) to let the user select a clip. +After selection, the clip is put onto the PRIMARY and CLIPBOARD X selections.") + (license license:public-domain)))) -- 2.24.1 --=-=-=-- ------------=_1583948701-21017-1--