(define-module (tw packages catppuccin) #:use-module (guile) #:use-module ((gnu packages base) #:select (coreutils gnu-make findutils sed (which . which-package))) #:use-module (gnu packages bash) #:use-module (gnu packages gawk) #:use-module (gnu packages gnome-xyz) #:use-module (gnu packages gtk) #:use-module (gnu packages inkscape) #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages kde-plasma) #:use-module (gnu packages pkg-config) #:use-module (gnu packages qt) #:use-module (gnu packages web) #:use-module (gnu packages xorg) #:use-module (guix build utils) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system qt) #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages)) (define-public catppuccin-gtk-theme (package (name "catppuccin-gtk-theme") (version "0.2.7") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/catppuccin/gtk") (commit (string-append "v-" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0k7vkqyhzikmmlv96h56n7zwxawzbhz3f0jf3r5ajnnc258iyc51")))) (inputs (list gtk-engines)) (native-inputs (list bash-minimal coreutils sassc sed which-package)) (build-system trivial-build-system) (arguments '(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let* ((out (assoc-ref %outputs "out")) (configdir (string-append out "/etc/xdg")) (themesdir (string-append out "/share/themes"))) (setenv "PATH" (string-trim-right (apply string-append (map (lambda (input) (string-append (cdr input) "/bin:")) %build-inputs)) #\:)) (copy-recursively (assoc-ref %build-inputs "source") (getcwd)) (for-each make-file-writable (find-files (getcwd))) ;; clean-old-theme.sh is invoked by install.sh. (for-each patch-shebang '("build.sh" "install.sh" "clean-old-theme.sh")) ;; install.sh tries to install a bunch of stuff into $HOME/.config. ;; Make it install into /etc/xdg instead. (substitute* "install.sh" (("\\$\\{?HOME\\}?/\\.config") configdir)) (invoke "./build.sh") (mkdir-p themesdir) (invoke "./install.sh" "-d" themesdir) ;; Instead of Tela-circle, use Papirus. ;; (for-each (lambda (file) ;; (substitute* file ;; (("Tela-circle") "Papirus"))) ;; (find-files themesdir "/share/themes/[^/]+/index\\.theme$")) #t)))) (home-page "https://github.com/catppuccin/gtk") (synopsis "Soothing pastel theme for GTK") (description "Soothing pastel theme for GTK 3, GTK 2, GNOME-Shell and other DEs (like XFCE) using the Catppuccin color palette. This theme is based on the Colloid theme made by Vinceliuice.") (license license:gpl3))) (define-public catppuccin-mocha-dark-cursors (let ((commit "21942800ad34b357a12079718a1faa88f0bccf28") (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)))) (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/"))))