all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan.J.Smith@outlook.com
To: 46149@debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>
Subject: [bug#46149] [PATCH 2/2] gnu: Add emacs-theme-magic.
Date: Wed, 27 Jan 2021 22:05:43 -0500	[thread overview]
Message-ID: <SN4PR0801MB36792125CE5568A88ABBDE2EC5BA9@SN4PR0801MB3679.namprd08.prod.outlook.com> (raw)
In-Reply-To: <SN4PR0801MB367921B082E201AA871933CAC5BA9@SN4PR0801MB3679.namprd08.prod.outlook.com>

From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/emacs-xyz.scm (emacs-theme-magic): New variable.
---
 gnu/packages/emacs-xyz.scm | 49 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 48a0b2a517..78add92372 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -76,7 +76,7 @@
 ;;; Copyright © 2020 Fredrik Salomonsson <plattfot@gmail.com>
 ;;; Copyright © 2020 Ryan Desfosses <rdes@protonmail.com>
 ;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
-;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;; Copyright © 2020 Peng Mei Yu <i@pengmeiyu.com>
 ;;; Copyright © 2020 Niklas Eklund <niklas.eklund@posteo.net>
 ;;; Copyright © 2020 Marco Grassi <marco.au.grassi98@protonmail.com>
@@ -725,6 +725,53 @@ (define-public emacs-moody
 then only the color of the mode line changes when a window becomes in-/active.")
     (license license:gpl3+)))
 
+(define-public emacs-theme-magic
+  ;; No tagged release upstream, but the commit below correspond to the 0.2.3
+  ;; release.
+  (let ((commit "844c4311bd26ebafd4b6a1d72ddcc65d87f074e3")
+        (revision "0"))
+    (package
+      (name "emacs-theme-magic")
+      (version "0.2.3")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/jcaw/theme-magic")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "10gkg7jh1s1484gm66a87zr7x8vmv00s7gfd0w2pj47nqf98g8hz"))))
+      (build-system emacs-build-system)
+      (arguments
+       `(;; Include pywal interaction scripts
+         #:include (cons "^python/" %default-include)
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-exec-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((files '("theme-magic.el" "python/wal_change_colors.py"))
+                     (python (assoc-ref inputs "python"))
+                     (python-pywal (assoc-ref inputs "python-pywal")))
+                 ;; Specify the absolute executable locations.
+                 (for-each
+                  (lambda (file)
+                    (substitute* file
+                      (("\"python\"") (string-append "\"" python "/bin/python3\""))
+                      (("\"wal\"") (string-append "\"" python-pywal "/bin/wal\""))))
+                  files))
+               #t)))))
+      (inputs
+       `(("python" ,python)
+         ("python-pywal" ,python-pywal)))
+      (home-page "https://github.com/jcaw/theme-magic")
+      (synopsis "Generate and apply pywal color palettes based on your Emacs
+theme")
+      (description "Running @code{M-x theme-magic-from-emacs} will extract the
+colors from your Emacs theme and apply them to the rest of Linux with pywal.
+Pywal only applies your theme to the current session.")
+      (license license:gpl3+))))
+
 (define-public emacs-treepy
   (package
     (name "emacs-treepy")
-- 
2.30.0





  reply	other threads:[~2021-01-28  3:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28  2:48 [bug#46149] [PATCH 1/2] gnu: Add python-pywal Morgan.J.Smith
2021-01-28  3:05 ` Morgan.J.Smith [this message]
2021-01-28 13:19 ` bug#46149: " Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN4PR0801MB36792125CE5568A88ABBDE2EC5BA9@SN4PR0801MB3679.namprd08.prod.outlook.com \
    --to=morgan.j.smith@outlook.com \
    --cc=46149@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.