(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)))) ;; 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") ;; 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") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "07wizfbr0w23546n2skf8c33nayzxv044spbwrprjmh8sy7v6m7w")))) (build-system copy-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/")))) (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))))