aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2023-11-21 22:09:44 +0100
committerTimo Wilken2023-11-21 22:09:44 +0100
commit68c09c0bdd23a588f8ab75593b0fd8bf5f38d6c7 (patch)
tree60c1ca0a1ba8a2683fdb9cb2804c2ec2dd05bbc0
parent4fb486beb38389d79fbe889439527664ecfb57c0 (diff)
Package Catppuccin themes instead of using git submodules
This makes administrating this repo easier, and the home environment can be reconfigured without having to add the checkout to the guile load path.
-rw-r--r--.gitmodules30
-rw-r--r--tw/home.scm3
-rw-r--r--tw/packages/catppuccin.scm223
-rw-r--r--tw/theme.scm74
m---------tw/theme/catppuccin/dunst0
m---------tw/theme/catppuccin/emacs0
m---------tw/theme/catppuccin/kde0
m---------tw/theme/catppuccin/kitty0
m---------tw/theme/catppuccin/neomutt0
m---------tw/theme/catppuccin/newsboat0
m---------tw/theme/catppuccin/polybar0
m---------tw/theme/catppuccin/rofi0
m---------tw/theme/catppuccin/vim0
m---------tw/theme/catppuccin/zathura0
14 files changed, 171 insertions, 159 deletions
diff --git a/.gitmodules b/.gitmodules
index cd1f5f83..fa1068b8 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,33 +1,3 @@
-[submodule "catppuccin/kitty"]
- path = tw/theme/catppuccin/kitty
- url = https://github.com/catppuccin/kitty
-[submodule "catppuccin/rofi"]
- path = tw/theme/catppuccin/rofi
- url = https://github.com/catppuccin/rofi
-[submodule "catppuccin/dunst"]
- path = tw/theme/catppuccin/dunst
- url = https://github.com/catppuccin/dunst
-[submodule "catppuccin/zathura"]
- path = tw/theme/catppuccin/zathura
- url = https://github.com/catppuccin/zathura
-[submodule "catppuccin/neomutt"]
- path = tw/theme/catppuccin/neomutt
- url = https://github.com/catppuccin/neomutt
-[submodule "catppuccin/polybar"]
- path = tw/theme/catppuccin/polybar
- url = https://github.com/catppuccin/polybar
-[submodule "catppuccin/emacs"]
- path = tw/theme/catppuccin/emacs
- url = https://github.com/catppuccin/emacs
-[submodule "catppuccin/kde"]
- path = tw/theme/catppuccin/kde
- url = https://github.com/catppuccin/kde
-[submodule "catppuccin/newsboat"]
- path = tw/theme/catppuccin/newsboat
- url = https://github.com/catppuccin/newsboat
[submodule "neomutt"]
path = tw/home/files/neomutt
url = https://github.com/neomutt/neomutt
-[submodule "tw/theme/catppuccin/vim"]
- path = tw/theme/catppuccin/vim
- url = https://github.com/catppuccin/vim
diff --git a/tw/home.scm b/tw/home.scm
index 2a6340c7..ad233dd6 100644
--- a/tw/home.scm
+++ b/tw/home.scm
@@ -402,8 +402,7 @@ show_border=1
(simple-service 'emacs-config home-xdg-configuration-files-service-type
`(("emacs/include" ,(local-file "home/files/emacs-packages" #:recursive? #t))
("emacs/init.el" ,(local-file "home/files/emacs-init.el"))
- (,(string-append "emacs/" (local-file-name catppuccin-emacs-theme))
- ,catppuccin-emacs-theme)))
+ ("emacs/catppuccin-theme.el" ,catppuccin-emacs)))
(simple-service 'emacsclient-is-editor home-environment-variables-service-type
`(("EDITOR" . "emacsclient -qc")
diff --git a/tw/packages/catppuccin.scm b/tw/packages/catppuccin.scm
index ae2675e3..38aade69 100644
--- a/tw/packages/catppuccin.scm
+++ b/tw/packages/catppuccin.scm
@@ -82,111 +82,148 @@ theme is based on the Colloid theme made by Vinceliuice.")
(revision "1")
(variant "Mocha-Dark"))
(package
- (name (string-append "catppuccin-" (string-downcase variant) "-cursors"))
- ;; See info '(guix)Version Numbers' for advice.
- (version (git-version "0.0.0" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/catppuccin/cursors")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256 (base32 "0ay415131hw1zk6aplmhm3vdmrb0rjw6qxz2svagy325jrfd79fk"))))
- (native-inputs (list bash-minimal coreutils findutils gawk gnu-make inkscape xcursorgen))
- (build-system trivial-build-system)
- (arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let ((source (assoc-ref %build-inputs "source"))
- (out (assoc-ref %outputs "out")))
- (setenv "PATH" (string-trim-right
- (apply string-append
- (map (lambda (input)
- (string-append (cdr input) "/bin:"))
- %build-inputs))
- #\:))
- (mkdir-p "src")
- ;; Without pruning, there are 8832 .svgs to convert. This
- ;; takes too long. Just keep the ones I actually want.
- (for-each (lambda (item)
- (copy-recursively (string-append source "/" item) item))
- (list "AUTHORS" "LICENSE" "Makefile" "build.sh"
- "src/config" "src/_svgo.yml" "src/cursorList"
- (string-append "src/Catppuccin-" ,variant "-Cursors")))
- (for-each make-file-writable (find-files (getcwd)))
- (patch-shebang "build.sh")
- (invoke "make")
- (invoke "make" "install" (string-append "PREFIX=" out))
- #t))))
- (home-page "https://github.com/catppuccin/cursors")
- (synopsis "Soothing pastel mouse cursors")
- (description "Soothing pastel cursor theme using the Catppuccin
-color palette. This project is just a modification of Volantes
-Cursors with a Catppuccin palettes.")
- (license license:gpl2))))
-
-;; Based on the Arch package:
-;; https://github.com/archlinux/svntogit-community/blob/packages/kvantum/trunk/PKGBUILD
-
-;; Based on the "lightly-qt" AUR package:
-;; https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=lightly-qt
-;; lightly is now packaged by Guix upstream
-;; (define-public lightly
-;; (package
-;; (name "lightly")
-;; (version "0.4.1")
-;; (source
-;; (origin
-;; (method git-fetch)
-;; (uri (git-reference
-;; (url "https://github.com/Luwx/Lightly")
-;; (commit (string-append "v" version))))
-;; (file-name (git-file-name name version))
-;; (sha256 (base32 "0qkjzgjplgwczhk6959iah4ilvazpprv7yb809jy75kkp1jw8mwk"))))
-;; (build-system qt-build-system) ; cmake-build-system should be fine too
-;; (native-inputs
-;; (list extra-cmake-modules qtbase-5 qtdeclarative-5 qtx11extras
-;; kconfigwidgets kcoreaddons kdecoration kguiaddons
-;; ki18n kiconthemes kwindowsystem
-;; kde-frameworkintegration ; optional; Required to use KStyle convenience functionalities in style
-;; kcmutils ; optional; Required for lightly-settings5 application to build
-;; kwayland ; optional
-;; pkg-config)) ; optional
-;; (home-page "https://github.com/Luwx/Lightly")
-;; (synopsis "A modern style for qt applications")
-;; (description "Lightly is a fork of breeze theme style that aims
-;; to be visually modern and minimalistic.")
-;; (license license:gpl2+)))
-
-(define-public catppuccin-kde-theme
- (let ((commit "494c8576b17626a7b2c7a43cec8e6133a5e9c482")
- (revision "1"))
- (package
- (name "catppuccin-kde-theme")
+ (name (string-append "catppuccin-" (string-downcase variant) "-cursors"))
;; See info '(guix)Version Numbers' for advice.
(version (git-version "0.0.0" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/catppuccin/kde")
+ (url "https://github.com/catppuccin/cursors")
(commit commit)))
(file-name (git-file-name name version))
- (sha256 (base32 "07wizfbr0w23546n2skf8c33nayzxv044spbwrprjmh8sy7v6m7w"))))
- (build-system copy-build-system)
+ (sha256 (base32 "0ay415131hw1zk6aplmhm3vdmrb0rjw6qxz2svagy325jrfd79fk"))))
+ (native-inputs (list bash-minimal coreutils findutils gawk gnu-make inkscape xcursorgen))
+ (build-system trivial-build-system)
(arguments
- '(#:install-plan
- '(("Frappe/CatppuccinFrappe.colors" "share/color-schemes/")
- ("Latte/CatppuccinLatte.colors" "share/color-schemes/")
- ("Macchiato/CatppuccinMacchiato.colors" "share/color-schemes/")
- ("Mocha/CatppuccinMocha.colors" "share/color-schemes/")
- ("LICENSE" "share/doc/catppuccin-kde-theme/"))))
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((source (assoc-ref %build-inputs "source"))
+ (out (assoc-ref %outputs "out")))
+ (setenv "PATH" (string-trim-right
+ (apply string-append
+ (map (lambda (input)
+ (string-append (cdr input) "/bin:"))
+ %build-inputs))
+ #\:))
+ (mkdir-p "src")
+ ;; Without pruning, there are 8832 .svgs to convert. This
+ ;; takes too long. Just keep the ones I actually want.
+ (for-each (lambda (item)
+ (copy-recursively (string-append source "/" item) item))
+ (list "AUTHORS" "LICENSE" "Makefile" "build.sh"
+ "src/config" "src/_svgo.yml" "src/cursorList"
+ (string-append "src/Catppuccin-" ,variant "-Cursors")))
+ (for-each make-file-writable (find-files (getcwd)))
+ (patch-shebang "build.sh")
+ (invoke "make")
+ (invoke "make" "install" (string-append "PREFIX=" out))
+ #t))))
(home-page "https://github.com/catppuccin/cursors")
(synopsis "Soothing pastel mouse cursors")
(description "Soothing pastel cursor theme using the Catppuccin
color palette. This project is just a modification of Volantes
Cursors with a Catppuccin palettes.")
(license license:gpl2))))
+
+(define* (catppuccin-theme-package
+ #:key program commit (version "0.0.0") (revision "1")
+ (license license:expat) repo-hash install-plan)
+ (package
+ (name (string-append "catppuccin-" program "-theme"))
+ ;; See info '(guix)Version Numbers' for advice.
+ (version (git-version "0.0.0" "1" commit))
+ (home-page (string-append "https://github.com/catppuccin/" program))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256 (base32 repo-hash))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan ',install-plan))
+ (synopsis (string-append "Soothing pastel theme for " program))
+ (description (string-append "Soothing pastel " program " theme using the
+Catppuccin color palette."))
+ (license license)))
+
+(define-public catppuccin-dunst-theme
+ (catppuccin-theme-package
+ #:program "dunst"
+ #:commit "a72991e56338289a9fce941b5df9f0509d2cba09"
+ #:repo-hash "12gidkxw7kkalhn9rflki2f4wcd2flmrz2m9rzynmfawwqm95dyl"
+ #:install-plan '(("src/" "share/catppuccin/dunst/"))))
+
+(define-public catppuccin-emacs-theme
+ (catppuccin-theme-package
+ #:program "emacs"
+ #:version "0.2.0-alpha"
+ #:revision "86"
+ #:commit "b778bb48be7111e19f27dc99891b515074496f82"
+ #:repo-hash "1nynlmwdzy1mgzx4jg3c7llffk19hixzk7bbsk6m1zhxgnsickqh"
+ #:install-plan '(("catppuccin-theme.el" "share/catppuccin/emacs/"))))
+
+(define-public catppuccin-kde-theme
+ (catppuccin-theme-package
+ #:program "kde"
+ #:commit "494c8576b17626a7b2c7a43cec8e6133a5e9c482"
+ #:repo-hash "07wizfbr0w23546n2skf8c33nayzxv044spbwrprjmh8sy7v6m7w"
+ #:license license:gpl2
+ #:install-plan '(("Frappe/CatppuccinFrappe.colors" "share/color-schemes/")
+ ("Latte/CatppuccinLatte.colors" "share/color-schemes/")
+ ("Macchiato/CatppuccinMacchiato.colors" "share/color-schemes/")
+ ("Mocha/CatppuccinMocha.colors" "share/color-schemes/"))))
+
+(define-public catppuccin-kitty-theme
+ (catppuccin-theme-package
+ #:program "kitty"
+ #:commit "4820b3ef3f4968cf3084b2239ce7d1e99ea04dda"
+ #:repo-hash "11gp5j3jgvy681d3x369312k2vpc5bgmnvgiwzznywdkzgwv355r"
+ #:install-plan '(("themes/" "share/catppuccin/kitty/"))))
+
+(define-public catppuccin-neomutt-theme
+ (catppuccin-theme-package
+ #:program "neomutt"
+ #:commit "f6ce83da47cc36d5639b0d54e7f5f63cdaf69f11"
+ #:repo-hash "0v8hfv23vv70cgkd3qarizwx85ch9jbzi09jnir8abw3znf7mvf9"
+ #:install-plan '(("./" "share/catppuccin/neomutt/"
+ #:include-regexp ("muttrc$")))))
+
+(define-public catppuccin-newsboat-theme
+ (catppuccin-theme-package
+ #:program "newsboat"
+ #:commit "be3d0ee1ba0fc26baf7a47c2aa7032b7541deb0f"
+ #:repo-hash "04ib4lvma5959n943f7myzbc2blmb8n2dd7bkb0xgl2rnpfx2fvk"
+ #:install-plan '(("themes/" "share/catppuccin/newsboat/"))))
+
+(define-public catppuccin-polybar-theme
+ (catppuccin-theme-package
+ #:program "polybar"
+ #:commit "9ee66f83335404186ce979bac32fcf3cd047396a"
+ #:repo-hash "040igkhrsgghrp5ni7zhglws3n8q6j7nc571d6gsvc9zr20d4ikd"
+ #:install-plan '(("themes/" "share/catppuccin/polybar/"))))
+
+(define-public catppuccin-rofi-theme
+ (catppuccin-theme-package
+ #:program "rofi"
+ #:commit "5350da41a11814f950c3354f090b90d4674a95ce"
+ #:repo-hash "15phrl9qlbzjxmp29hak3a5k015x60w2hxjif90q82vp55zjpnhc"
+ #:install-plan '(("basic/.local/share/rofi/themes/" "share/catppuccin/rofi/"))))
+
+(define-public catppuccin-vim-theme
+ (catppuccin-theme-package
+ #:program "vim"
+ #:commit "be4725cfc3fb6ed96f706d9d1bd5baa24d2b048c"
+ #:repo-hash "1mhrch0ck3g1gs79c6mlbj2krhqqk7hp5g0v7ahap71bcfk5yxk7"
+ #:install-plan '(("colors/" "share/catppuccin/vim/colors/")
+ ("autoload/" "share/catppuccin/vim/autoload/"))))
+
+(define-public catppuccin-zathura-theme
+ (catppuccin-theme-package
+ #:program "zathura"
+ #:commit "d85d8750acd0b0247aa10e0653998180391110a4"
+ #:repo-hash "1hv9wzjyg34533qaxc5dc3gy8fcyvpvzcri2aip1kf4varnpcn75"
+ #:install-plan '(("src/" "share/catppuccin/zathura/"))))
diff --git a/tw/theme.scm b/tw/theme.scm
index f60b6433..83ce8270 100644
--- a/tw/theme.scm
+++ b/tw/theme.scm
@@ -15,59 +15,62 @@
(define-module (tw theme)
#:use-module (guix gexp)
#:use-module ((guix modules)
- #:select (source-module-closure)))
-
-(fluid-set! read-eval? #t) ; allow #. read expansions in this file
+ #:select (source-module-closure))
+ #:use-module (tw packages catppuccin))
;; One of "latte" (light theme), "frappe", "macchiato", "mocha" (dark
;; themes); ordered brightest to darkest.
;; Set and use this at read time so that `local-file' gets a literal
;; argument. Anything else confuses it and causes it to search
;; relative to the working directory, not this file's directory.
-#.(define catppuccin-theme-variant "mocha")
+(define catppuccin-theme-variant "mocha")
;; "Base" colour from the active Catppuccin theme (see
;; https://github.com/catppuccin/catppuccin).
(define-public catppuccin-background-color "1e1e2e")
(define-public catppuccin-muttrc
- (local-file #.(if (string=? catppuccin-theme-variant "latte")
- "theme/catppuccin/neomutt/latte-neomuttrc"
- "theme/catppuccin/neomutt/neomuttrc")))
+ (file-append catppuccin-neomutt-theme
+ (if (string=? catppuccin-theme-variant "latte")
+ "/share/catppuccin/neomutt/latte-neomuttrc"
+ "/share/catppuccin/neomutt/neomuttrc")))
(define-public catppuccin-newsboat
- (local-file #.(if (string=? catppuccin-theme-variant "latte")
- "theme/catppuccin/newsboat/themes/latte"
- "theme/catppuccin/newsboat/themes/dark")
- "newsboat-theme.conf"))
+ (file-append catppuccin-newsboat-theme
+ (if (string=? catppuccin-theme-variant "latte")
+ "/share/catppuccin/newsboat/latte"
+ "/share/catppuccin/newsboat/dark")))
(define-public catppuccin-dunstrc
- (local-file #.(string-append "theme/catppuccin/dunst/src/"
- catppuccin-theme-variant ".conf")
- "dunst-theme.conf"))
+ (file-append catppuccin-dunst-theme
+ (string-append "/share/catppuccin/dunst/"
+ catppuccin-theme-variant ".conf")))
-(define-public catppuccin-emacs-theme
+(define-public catppuccin-emacs
;; Select the appropriate variant in Emacs.
- (local-file "theme/catppuccin/emacs/catppuccin-theme.el"))
+ (file-append catppuccin-emacs-theme
+ "/share/catppuccin/emacs/catppuccin-theme.el"))
(define-public catppuccin-kdeglobals
- (local-file #.(let ((variant (string-upcase catppuccin-theme-variant 0 1)))
- (string-append "theme/catppuccin/kde/" variant
- "/Catppuccin" variant ".colors"))))
+ (file-append catppuccin-kde-theme
+ (string-append "/share/color-schemes/Catppuccin"
+ (string-upcase catppuccin-theme-variant 0 1)
+ ".colors")))
(define-public catppuccin-kitty-diff
- (local-file #.(string-append "theme/catppuccin/kitty/themes/diff-"
- catppuccin-theme-variant ".conf")
- "kitty-diff-theme.conf"))
+ (file-append catppuccin-kitty-theme
+ (string-append "/share/catppuccin/kitty/diff-"
+ catppuccin-theme-variant ".conf")))
(define-public catppuccin-kitty
- (local-file #.(string-append "theme/catppuccin/kitty/themes/"
- catppuccin-theme-variant ".conf")
- "kitty-theme.conf"))
+ (file-append catppuccin-kitty-theme
+ (string-append "/share/catppuccin/kitty/"
+ catppuccin-theme-variant ".conf")))
(define-public catppuccin-polybar
- (local-file #.(string-append "theme/catppuccin/polybar/themes/"
- catppuccin-theme-variant ".ini")))
+ (file-append catppuccin-polybar-theme
+ (string-append "/share/catppuccin/polybar/"
+ catppuccin-theme-variant ".ini")))
(define-public catppuccin-rofi
(computed-file "catppuccin.rasi"
@@ -75,18 +78,21 @@
'((guix build utils)))
#~(begin
(use-modules (guix build utils))
- (copy-file #$(local-file #.(string-append
- "theme/catppuccin/rofi/basic/.local/share/rofi/themes/catppuccin-"
- catppuccin-theme-variant ".rasi"))
+ (copy-file #$(file-append catppuccin-rofi-theme
+ (string-append
+ "/share/catppuccin/rofi/catppuccin-"
+ catppuccin-theme-variant ".rasi"))
#$output)
(substitute* #$output
(("JetBrainsMono Nerd Font 14") "Fira Sans 12") ; default font
(("border-col: #[0-9a-f]*;") "border-col: #585b70;")))))) ; i3 border colour
(define-public catppuccin-vim
- (local-file #.(string-append "theme/catppuccin/vim/colors/catppuccin_"
- catppuccin-theme-variant ".vim")))
+ (file-append catppuccin-vim-theme
+ (string-append "/share/catppuccin/vim/colors/catppuccin_"
+ catppuccin-theme-variant ".vim")))
(define-public catppuccin-zathura
- (local-file #.(string-append "theme/catppuccin/zathura/src/catppuccin-"
- catppuccin-theme-variant)))
+ (file-append catppuccin-zathura-theme
+ (string-append "/share/catppuccin/zathura/catppuccin-"
+ catppuccin-theme-variant)))
diff --git a/tw/theme/catppuccin/dunst b/tw/theme/catppuccin/dunst
deleted file mode 160000
-Subproject a72991e56338289a9fce941b5df9f0509d2cba0
diff --git a/tw/theme/catppuccin/emacs b/tw/theme/catppuccin/emacs
deleted file mode 160000
-Subproject 130519df71878bde23602fc8453b501c6dbd8fd
diff --git a/tw/theme/catppuccin/kde b/tw/theme/catppuccin/kde
deleted file mode 160000
-Subproject d95dd080b3e6a064390aceb8af0a6dc9506a40c
diff --git a/tw/theme/catppuccin/kitty b/tw/theme/catppuccin/kitty
deleted file mode 160000
-Subproject 4820b3ef3f4968cf3084b2239ce7d1e99ea04dd
diff --git a/tw/theme/catppuccin/neomutt b/tw/theme/catppuccin/neomutt
deleted file mode 160000
-Subproject f6ce83da47cc36d5639b0d54e7f5f63cdaf69f1
diff --git a/tw/theme/catppuccin/newsboat b/tw/theme/catppuccin/newsboat
deleted file mode 160000
-Subproject be3d0ee1ba0fc26baf7a47c2aa7032b7541deb0
diff --git a/tw/theme/catppuccin/polybar b/tw/theme/catppuccin/polybar
deleted file mode 160000
-Subproject 9ee66f83335404186ce979bac32fcf3cd047396
diff --git a/tw/theme/catppuccin/rofi b/tw/theme/catppuccin/rofi
deleted file mode 160000
-Subproject 5350da41a11814f950c3354f090b90d4674a95c
diff --git a/tw/theme/catppuccin/vim b/tw/theme/catppuccin/vim
deleted file mode 160000
-Subproject be4725cfc3fb6ed96f706d9d1bd5baa24d2b048
diff --git a/tw/theme/catppuccin/zathura b/tw/theme/catppuccin/zathura
deleted file mode 160000
-Subproject d85d8750acd0b0247aa10e0653998180391110a