(define-module (ruther home packages themes)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages gnome)
#:use-module (gnu packages web)
#:use-module (gnu packages inkscape)
#:use-module (gnu packages xorg)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix build utils)
#:use-module (guix gexp)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module (guix git-download)
#:export (make-graphite-gtk-theme
make-tela-circle-icon-theme
make-catppuccin-cursors))
(define* (make-graphite-gtk-theme #:key
theme
(color "standard")
(size "standard"))
(package
(name (string-append "graphite-" theme "-" color "-" size "-theme"))
(version "2024-07-15")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/vinceliuice/Graphite-gtk-theme")
(commit version)))
(sha256
(base32 "1fmbfyf5j9mi31r84x8vb1z82jfg9cqcg27q7n579l65n3zybpck"))))
(build-system gnu-build-system)
(inputs
(list gnome-themes-extra))
(native-inputs
(list sassc))
(properties
`((theme-name . ,(string-append "Graphite-" theme "-" (string-titlecase color)))))
(arguments
`(#:phases (modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(delete 'check)
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
(invoke
"bash"
"install.sh"
"-t" ,theme
"-c" ,color
"-d" (string-append (assoc-ref %outputs "out") "/share/themes")))))))
(synopsis "Graphite gtk theme")
(description "Graphite gtk theme")
(home-page "https://github.com/vinceliuice/Graphite-gtk-theme")
(license license:gpl3)))
(define* (make-tela-circle-icon-theme #:key (variant "standard"))
(package
(name (string-append "tela-circle-" variant "-icon-theme"))
(version "2024-04-19")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/vinceliuice/Tela-circle-icon-theme")
(commit version)))
(sha256
(base32 "1w7m6wqc205y5v3lrwd2a27df0hfhp3xv4sgz12kv5qih2g2dldy"))
(snippet
#~(begin (use-modules (guix build utils))
(substitute* "install.sh"
(("gtk-update-icon-cache.*") ""))))))
(build-system gnu-build-system)
(inputs
(list gnome-themes-extra))
(properties
`((icon-theme-name . ,(string-append "Tela-circle-" variant))
(dark-icon-theme-name . ,(string-append "Tela-circle-" variant "-dark"))
(light-icon-theme-name . ,(string-append "Tela-circle-" variant "-light"))))
(arguments
`(#:phases (modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(delete 'check)
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
(invoke
"bash"
"install.sh"
"-c" ,variant
"-d" (string-append (assoc-ref %outputs "out") "/share/icons")))))))
(synopsis "Tela icon theme")
(description "Tela icon theme")
(home-page "https://github.com/vinceliuice/Tela-circle-icon-theme")
(license #f)))
(define* (make-catppuccin-cursors #:key flavor accent)
(package
(name (string-append "cattpuccin-cursors-" flavor "-" accent))
(version "0.3.1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/catppuccin/cursors")
(commit (string-append "v" version))))
(sha256
(base32 "0pb393jlsrjfz8jhrgydhmv4hygf5wjs5jbc5m5628nixzlc7v0a"))))
(build-system gnu-build-system)
(native-inputs
(list inkscape xcursorgen))
(properties
`((cursor-theme-name . ,(string-append "catppuccin-" flavor "-" accent "-cursors"))))
(arguments
`(#:phases (modify-phases %standard-phases
(delete 'configure)
(delete 'check)
(replace 'build
(lambda* _
(invoke
"bash"
"build"
"-f" ,flavor
"-a" ,accent)))
(replace 'install
(lambda* _
(copy-recursively
"dist"
(string-append (assoc-ref %outputs "out") "/share/icons")))))))
(synopsis "Catppuccin cursors")
(description "Catppuccin cursors")
(home-page "https://github.com/catppuccin/cursors/tree/main")
(license license:gpl2)))