aboutsummaryrefslogtreecommitdiff
path: root/tw/packages/catppuccin.scm
blob: 8d065f3de9eec3cf91f9f8fe7f6e05636f5a77cb (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
(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 "24"   ; total number of commits since repo beginning
   #:commit "478050d979aa8db8eda2d6d23a365823ab67e539"
   #:repo-hash "0q9a818rwsqx5kvln5zzfan54xaw9yqbbm5hjbrwzdl5q8g28qir"
   #: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))))