(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) #:select (gnome-backgrounds)) #: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 gexp) #: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 version revision 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-aerc-theme (catppuccin-theme-package #:program "aerc" #:revision "23" ; total number of commits since repo beginning #:commit "c077726d2833852f324d1b2bd5b7f4be02ce0978" #:repo-hash "1z3sfx1q8qw56pai1pxc55d86v31xx9vkh1g5sr4i5hhk8db92l9" #:install-plan '(("dist/" "share/catppuccin/aerc/")))) (define-public catppuccin-dunst-theme (catppuccin-theme-package #:program "dunst" #:revision "7" ; total number of commits since repo beginning #: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 "90" #:commit "1e9bdb0c19bf13c27a32b1adeabcace45fcbfd15" #:repo-hash "1cv46rqdd159plnqdkl74zwcgmbndq81d02g41a327hdwbpahp6v" #:install-plan '(("catppuccin-theme.el" "share/catppuccin/emacs/")))) (define-public catppuccin-foot-theme (catppuccin-theme-package #:program "foot" #:commit "307611230661b7b1787feb7f9d122e851bae97e9" #:revision "44" ; total number of commits since repo beginning #:repo-hash "0ki01m4r3rxsx0vqjylwa3i6f6k8lf1xbsx2kv1xfzbd68fdhhws" #:install-plan '(("themes/" "share/catppuccin/foot/")))) (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 "d7d61716a83cd135344cbb353af9d197c5d7cec1" #:revision "59" ; total number of commits since repo beginning #:repo-hash "0cr244zwh46vgjw2i6j53f6n02gc48ry6s0xmna91f0zipxml4cr" #:install-plan '(("themes/" "share/catppuccin/kitty/")))) (define-public catppuccin-newsboat-theme (catppuccin-theme-package #:program "newsboat" #:revision "7" ; total number of commits since repo beginning #:commit "be3d0ee1ba0fc26baf7a47c2aa7032b7541deb0f" #:repo-hash "04ib4lvma5959n943f7myzbc2blmb8n2dd7bkb0xgl2rnpfx2fvk" #:install-plan '(("themes/" "share/catppuccin/newsboat/")))) (define-public catppuccin-polybar-theme (catppuccin-theme-package #:program "polybar" #:revision "9" ; total number of commits since repo beginning #:commit "989420b24e1f651b176c9d6083ad7c3b90a27f8b" #:repo-hash "0wvshs5f54h0nfzf7pjwdhmj6xcngxqqvaqzxa3w5j7sk89nmwyr" #:install-plan '(("themes/" "share/catppuccin/polybar/")))) (define-public catppuccin-rofi-theme (catppuccin-theme-package #:program "rofi" #:revision "43" ; total number of commits since repo beginning #:commit "5350da41a11814f950c3354f090b90d4674a95ce" #:repo-hash "15phrl9qlbzjxmp29hak3a5k015x60w2hxjif90q82vp55zjpnhc" #:install-plan '(("basic/.local/share/rofi/themes/" "share/catppuccin/rofi/")))) (define-public catppuccin-swaylock-theme (catppuccin-theme-package #:program "swaylock" #:revision "41" #:commit "77246bbbbf8926bdb8962cffab6616bc2b9e8a06" #:repo-hash "02nql7ry71fxlhj0vsbsxi3jrmfajxmapr9gg0mzp0k0bxwqxa00" #:install-plan '(("themes/" "share/catppuccin/swaylock/")))) (define-public catppuccin-vim-theme (catppuccin-theme-package #:program "vim" #:revision "39" ; total number of commits since repo beginning #:commit "be4725cfc3fb6ed96f706d9d1bd5baa24d2b048c" #:repo-hash "1mhrch0ck3g1gs79c6mlbj2krhqqk7hp5g0v7ahap71bcfk5yxk7" #:install-plan '(("colors/" "share/catppuccin/vim/colors/") ("autoload/" "share/catppuccin/vim/autoload/")))) (define-public catppuccin-waybar-theme (catppuccin-theme-package #:program "waybar" #:version "1.1" #:commit "0830796af6aa64ce8bc7453d42876a628777ac68" #:repo-hash "0np88b9zi6zk21fy5w4kmgjg1clqp4ggw1hijlv9qvlka2zkwmpn" #:install-plan '(("themes/" "share/catppuccin/waybar/")))) (define-public catppuccin-zathura-theme (catppuccin-theme-package #:program "zathura" #:revision "37" ; total number of commits since repo beginning #:commit "1bda9d8274dd327b7931886ef0c5c1eb33903814" #:repo-hash "104qmrmb249ly2zp797m652bgsvs09q22p65a73lz0fmv7k9qqqx" #:install-plan '(("src/" "share/catppuccin/zathura/")))) (define-public tw-background (package (name "tw-background") (version "1") (source #f) (build-system trivial-build-system) (arguments `(#:builder ,(with-imported-modules '((guix build utils)) #~(let* ((out-dir (string-append #$output "/share/backgrounds/tw")) (out-img (string-append out-dir "/blobs.png"))) (use-modules (guix build utils)) (mkdir-p out-dir) (invoke #+(file-append inkscape "/bin/inkscape") "-C" "-o" out-img #+(file-append gnome-backgrounds "/share/backgrounds/gnome/blobs-d.svg")))))) (native-inputs (list gnome-backgrounds inkscape)) (home-page #f) (synopsis "My chosen desktop background image") (description "This package definition generates a rasterised version of my chosen desktop background image from @code{gnome-backgrounds}.") (license (package-license gnome-backgrounds))))