* [bug#53274] [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc
@ 2022-01-14 23:18 John Kehayias via Guix-patches via
2022-01-14 23:20 ` [bug#53274] [PATCH 1/2] gnu: rofi: Add a search path for plugins John Kehayias via Guix-patches via
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: John Kehayias via Guix-patches via @ 2022-01-14 23:18 UTC (permalink / raw)
To: 53274
Hello,
My package submission spree continues. This short patch series adds rofi-calc, a plugin for the rofi launcher which allows you to do live calculations in rofi (including things like currency conversions) with qalculate's qalc.
The first patch adds a native-search-path for rofi, for the built-in variable ROFI_PLUGIN_PATH where it will search for plugins (libraries) by default.
The second adds rofi-calc.
I've tested everything builds and runs. Having rofi and rofi-calc installed sets the search-path and you can do 'rofi -show calc' to launch the plugin without needing to do anything else.
Thanks for looking!
John
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#53274] [PATCH 1/2] gnu: rofi: Add a search path for plugins.
2022-01-14 23:18 [bug#53274] [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc John Kehayias via Guix-patches via
@ 2022-01-14 23:20 ` John Kehayias via Guix-patches via
2022-01-14 23:22 ` [bug#53274] [PATCH 2/2] gnu: Add rofi-calc John Kehayias via Guix-patches via
2022-01-23 22:26 ` bug#53274: [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc Ludovic Courtès
2 siblings, 0 replies; 4+ messages in thread
From: John Kehayias via Guix-patches via @ 2022-01-14 23:20 UTC (permalink / raw)
To: 53274@debbugs.gnu.org
[-- Attachment #1: Type: text/plain, Size: 13 bytes --]
Empty Message
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-rofi-Add-a-search-path-for-plugins.patch --]
[-- Type: text/x-patch; name=0001-gnu-rofi-Add-a-search-path-for-plugins.patch, Size: 1275 bytes --]
From bae5766b9c3eff33aa6ec069936e919cfe079f19 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Fri, 14 Jan 2022 17:28:54 -0500
Subject: [PATCH 1/2] gnu: rofi: Add a search path for plugins.
* gnu/packages/xdisorg.scm (rofi)[native-search-paths]: Add ROFI_PLUGIN_PATH.
---
gnu/packages/xdisorg.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 74a6ea38b8..65cb1c947c 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -52,6 +52,7 @@
;;; Copyright © 2021 ikasero <ahmed@ikasero.com>
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1718,6 +1719,11 @@ (define-public rofi
xcb-util-cursor
xcb-util-wm
xcb-util-xrm))
+ (native-search-paths
+ ;; This is where rofi will search for plugins by default.
+ (list (search-path-specification
+ (variable "ROFI_PLUGIN_PATH")
+ (files '("lib/rofi")))))
(arguments
`(#:parallel-tests? #f ; fails in some circumstances
#:phases
--
2.34.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#53274] [PATCH 2/2] gnu: Add rofi-calc.
2022-01-14 23:18 [bug#53274] [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc John Kehayias via Guix-patches via
2022-01-14 23:20 ` [bug#53274] [PATCH 1/2] gnu: rofi: Add a search path for plugins John Kehayias via Guix-patches via
@ 2022-01-14 23:22 ` John Kehayias via Guix-patches via
2022-01-23 22:26 ` bug#53274: [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc Ludovic Courtès
2 siblings, 0 replies; 4+ messages in thread
From: John Kehayias via Guix-patches via @ 2022-01-14 23:22 UTC (permalink / raw)
To: 53274@debbugs.gnu.org
[-- Attachment #1: Type: text/plain, Size: 13 bytes --]
Empty Message
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-rofi-calc.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-rofi-calc.patch, Size: 2688 bytes --]
From b7056b43e96109c907216ca1d17f68f2a1130d59 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Fri, 14 Jan 2022 18:13:08 -0500
Subject: [PATCH 2/2] gnu: Add rofi-calc.
* gnu/packages/xdisorg.scm (rofi-calc): 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 65cb1c947c..cb291f4634 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -78,6 +78,7 @@ (define-module (gnu packages xdisorg)
#:use-module (guix build-system python)
#:use-module (guix build-system scons)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix hg-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -1741,6 +1742,51 @@ (define-public rofi
by name.")
(license license:expat)))
+(define-public rofi-calc
+ (package
+ (name "rofi-calc")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/svenstaro/rofi-calc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1j23xwa6s27wyx6r0yb85cby6dggrcb103nqcfxr5li1mcqrgd9m"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Don't try to install directly to rofi, instead install
+ ;; to lib/rofi to match rofi's search-path ROFI_PLUGIN_PATH.
+ (add-after 'unpack 'patch-plugindir
+ (lambda _
+ (substitute* "Makefile.am"
+ (("plugindir=\\$\\{rofi_PLUGIN_INSTALL_DIR\\}\\/")
+ "plugindir=${libdir}/rofi/"))))
+ (add-after 'unpack 'patch-qalc-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/calc.c"
+ (("\"qalc\"")
+ (string-append "\""
+ (search-input-file inputs "bin/qalc")
+ "\""))))))))
+ (inputs
+ (list cairo libqalculate rofi))
+ (native-inputs
+ (list autoconf automake libtool pkg-config))
+ (home-page
+ "https://github.com/svenstaro/rofi-calc")
+ (synopsis "Do live calculations in rofi with qalc")
+ (description
+ "@code{rofi-calc} is a rofi plugin that uses qalculate's @code{qalc} to parse
+natural language input and provide results.")
+ (license license:expat)))
+
(define-public tint2
(package
(name "tint2")
--
2.34.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#53274: [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc
2022-01-14 23:18 [bug#53274] [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc John Kehayias via Guix-patches via
2022-01-14 23:20 ` [bug#53274] [PATCH 1/2] gnu: rofi: Add a search path for plugins John Kehayias via Guix-patches via
2022-01-14 23:22 ` [bug#53274] [PATCH 2/2] gnu: Add rofi-calc John Kehayias via Guix-patches via
@ 2022-01-23 22:26 ` Ludovic Courtès
2 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2022-01-23 22:26 UTC (permalink / raw)
To: John Kehayias; +Cc: 53274-done
Hi John,
John Kehayias <john.kehayias@protonmail.com> skribis:
> My package submission spree continues. This short patch series adds rofi-calc, a plugin for the rofi launcher which allows you to do live calculations in rofi (including things like currency conversions) with qalculate's qalc.
>
> The first patch adds a native-search-path for rofi, for the built-in variable ROFI_PLUGIN_PATH where it will search for plugins (libraries) by default.
>
> The second adds rofi-calc.
Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-23 22:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 23:18 [bug#53274] [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc John Kehayias via Guix-patches via
2022-01-14 23:20 ` [bug#53274] [PATCH 1/2] gnu: rofi: Add a search path for plugins John Kehayias via Guix-patches via
2022-01-14 23:22 ` [bug#53274] [PATCH 2/2] gnu: Add rofi-calc John Kehayias via Guix-patches via
2022-01-23 22:26 ` bug#53274: [PATCH 0/2] Add rofi ROFI_PLUGIN_PATH search-path and rofi-calc Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.