]> git.ekhem.eu.org Git - guix.git/commitdiff
[emacs] Customize theme.
authorJakub Czajka <jakub@ekhem.eu.org>
Thu, 22 Dec 2022 20:55:00 +0000 (21:55 +0100)
committerJakub Czajka <jczajka@google.com>
Sun, 24 Dec 2023 18:53:07 +0000 (19:53 +0100)
Emacs themes consist of faces. Each face represents a specific element
of the interface. This commit defines a set of faces, forming a theme.

conf/home/emacs.scm
emacs/.config/emacs/conf/conf-theme.el [new file with mode: 0644]
emacs/.config/emacs/init.el

index b188c0769e2cb15cab55ad59e633e3a158758fbb..441dfdea1b63a12d1d5367ab2c40c6632da70ec6 100644 (file)
@@ -32,6 +32,7 @@
             (list emacs))
            (dotfiles
             (list "emacs/.config/emacs/init.el"
+                  "emacs/.config/emacs/conf/conf-theme.el"
                   "emacs/.local/bin/emacs_client")))))
 
 (define emacs-services
diff --git a/emacs/.config/emacs/conf/conf-theme.el b/emacs/.config/emacs/conf/conf-theme.el
new file mode 100644 (file)
index 0000000..5fd72d5
--- /dev/null
@@ -0,0 +1,36 @@
+;; Copyright (c) 2022 Jakub Czajka <jakub@ekhem.eu.org>
+;; License: GPL-3.0 or later.
+;;
+;; conf-theme.el - custom theme.
+
+(deftheme conf
+  "Custom theme.")
+
+(custom-theme-set-faces
+  'conf
+  ;; Buffer rendering.
+  `(default ((t (:background "#2a2a2a" :foreground "#f5f5f5"))))
+  `(cursor ((t (:background "#808080"))))
+  `(fringe ((t (:inherit default))))
+  `(highlight ((t (:inherit default :box "#ffffff"))))
+  `(italic ((t (:underline nil))))
+  `(link ((t (:foreground "#63a8ce" :underline t))))
+   ;; Symbols.
+  `(font-lock-comment-face ((t (:foreground "#00b000"))))
+  `(font-lock-constant-face ((t (:foreground "#fcb321"))))
+  `(font-lock-doc-face ((t (:inherit font-lock-comment-face))))
+  `(font-lock-function-name-face ((t (:foreground "#fed065"))))
+  `(font-lock-keyword-face ((t (:foreground "#75bff3"))))
+  `(font-lock-string-face ((t (:foreground "#fcba04"))))
+  `(font-lock-type-face ((t (:foreground "#5398be"))))
+  `(font-lock-variable-name-face ((t (:foreground "#ce9878"))))
+   ;; Mode line.
+  `(mode-line ((t (:background "#423f3b"
+                              :box "#7f7f7f"
+                              :foreground "#d5d5d5"))))
+  `(mode-line-inactive ((t (:inherit mode-line))))
+   ;; Selection.
+  `(region ((t (:background "#204461"))))
+  `(secondary-selection ((t (:inherit region)))))
+
+(provide-theme 'conf)
index b6e8b23f553dffb09c2f5587eba8093ce9a9781b..64fe8987d35764e4ff093513284b382f48db2381 100644 (file)
@@ -5,7 +5,10 @@
 ;; directory.
 
 (let ((conf-directory (expand-file-name "conf" user-emacs-directory)))
+  (push conf-directory custom-theme-load-path)
   (push conf-directory load-path)
 
+  (load-theme 'conf t)
+
   (dolist (file (directory-files conf-directory nil ".+\\.el?$"))
     (require (intern (file-name-sans-extension file)))))