aboutsummaryrefslogtreecommitdiff
path: root/tw/theme.scm
blob: 543504d9e56d374f9f48e95ea4b9dc2daf46648f (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
;; TODO: Integrate upstream (ctp) configs into ~/guix-home using git submodules:
;; https://github.com/catppuccin/grub   ; TODO: make this system-wide
;; https://github.com/catppuccin/tty    ; system-wide
;; https://github.com/catppuccin/papirus-folders
;; https://github.com/catppuccin/Kvantum
;; https://github.com/catppuccin/fzf
;; https://github.com/catppuccin/obs
;; https://github.com/catppuccin/insomnia
;; https://github.com/catppuccin/firefox  ; for icecat

;; Manual installation needed?
;; https://github.com/catppuccin/dark-reader
;; https://github.com/catppuccin/github

(define-module (tw theme)
  #:use-module (guix gexp)
  #:use-module ((guix modules)
                #:select (source-module-closure))
  #:use-module (tw packages catppuccin))

;; One of "latte" (light theme), "frappe", "macchiato", "mocha" (dark
;; themes); ordered brightest to darkest.
;; Set and use this at read time so that `local-file' gets a literal
;; argument. Anything else confuses it and causes it to search
;; relative to the working directory, not this file's directory.
(define catppuccin-theme-variant "mocha")

;; "Base" colour from the active Catppuccin theme (see
;; https://github.com/catppuccin/catppuccin).
(define-public catppuccin-background-color "1e1e2e")

(define-public catppuccin-aerc
  (file-append catppuccin-aerc-theme
               (string-append "/share/catppuccin/aerc/catppuccin-"
                              catppuccin-theme-variant)))

(define-public catppuccin-newsboat
  (file-append catppuccin-newsboat-theme
               (if (string=? catppuccin-theme-variant "latte")
                   "/share/catppuccin/newsboat/latte"
                   "/share/catppuccin/newsboat/dark")))

(define-public catppuccin-dunstrc
  (file-append catppuccin-dunst-theme
               (string-append "/share/catppuccin/dunst/"
                              catppuccin-theme-variant ".conf")))

(define-public catppuccin-emacs
  ;; Select the appropriate variant in Emacs.
  (file-append catppuccin-emacs-theme
               "/share/catppuccin/emacs/catppuccin-theme.el"))

(define-public catppuccin-foot
  (file-append catppuccin-foot-theme
               (string-append "/share/catppuccin/foot/catppuccin-"
                              catppuccin-theme-variant ".ini")))

(define-public catppuccin-kdeglobals
  (file-append catppuccin-kde-theme
               (string-append "/share/color-schemes/Catppuccin"
                              (string-upcase catppuccin-theme-variant 0 1)
                              ".colors")))

(define-public catppuccin-kitty-diff
  (file-append catppuccin-kitty-theme
               (string-append "/share/catppuccin/kitty/diff-"
                              catppuccin-theme-variant ".conf")))

(define-public catppuccin-kitty
  (file-append catppuccin-kitty-theme
               (string-append "/share/catppuccin/kitty/"
                              catppuccin-theme-variant ".conf")))

(define-public catppuccin-polybar
  (file-append catppuccin-polybar-theme
               (string-append "/share/catppuccin/polybar/"
                              catppuccin-theme-variant ".ini")))

(define-public catppuccin-rofi
  (computed-file "catppuccin.rasi"
    (with-imported-modules (source-module-closure
                            '((guix build utils)))
      #~(begin
          (use-modules (guix build utils))
          (copy-file #$(file-append catppuccin-rofi-theme
                                    (string-append
                                     "/share/catppuccin/rofi/catppuccin-"
                                     catppuccin-theme-variant ".rasi"))
                     #$output)
          (substitute* #$output
            (("JetBrainsMono Nerd Font 14") "Fira Sans 12")            ; default font
            (("border-col: #[0-9a-f]*;") "border-col: #585b70;"))))))  ; i3 border colour

(define-public catppuccin-swaylock
  (file-append catppuccin-swaylock-theme
               (string-append "/share/catppuccin/swaylock/"
                              catppuccin-theme-variant ".conf")))

(define-public catppuccin-vim
  (file-append catppuccin-vim-theme
               (string-append "/share/catppuccin/vim/colors/catppuccin_"
                              catppuccin-theme-variant ".vim")))

(define-public catppuccin-waybar
  (file-append catppuccin-waybar-theme
               (string-append "/share/catppuccin/waybar/"
                              catppuccin-theme-variant ".css")))

(define-public catppuccin-zathura
  (file-append catppuccin-zathura-theme
               (string-append "/share/catppuccin/zathura/catppuccin-"
                              catppuccin-theme-variant)))