-
Notifications
You must be signed in to change notification settings - Fork 1
/
theme.lisp
90 lines (78 loc) · 2.09 KB
/
theme.lisp
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
(in-package :stumpwm)
;;; Visual
(defvar *themes* (make-hash-table))
(defun add-theme (name theme)
(setf (gethash name *themes*) theme))
;;; Colors based off spacemacs-dark-theme for emacs
(defclass theme ()
((fg
:initarg :fg
:type string)
(bg
:initarg :bg
:type string)
(border
:initarg :border
:type string)
(focus
:initarg :focus
:type string)
(unfocus
:initarg :unfocus
:type string)
(mode-line-fg
:initarg :mode-line-fg
:type string)
(mode-line-bg
:initarg :mode-line-bg
:type string)
(mode-line-border
:initarg :mode-line-border
:type string)
(color-map-first
:initarg :color-map-first
:type string)
(color-map-last
:initarg :color-map-last
:type string)))
(defun apply-theme (theme)
(set-fg-color (slot-value theme 'fg))
(set-bg-color (slot-value theme 'bg))
(set-border-color (slot-value theme 'border))
(set-focus-color (slot-value theme 'focus))
(set-unfocus-color (slot-value theme 'unfocus))
(setf *mode-line-foreground-color* (slot-value theme 'mode-line-fg)
*mode-line-background-color* (slot-value theme 'mode-line-bg)
*mode-line-border-color* (slot-value theme 'mode-line-border))
(setf (car *colors*) (slot-value theme 'color-map-first)
(car (last *colors*)) (slot-value theme 'color-map-last))
(update-color-map (current-screen)))
(let ((grey "#292b2e")
(purple "#5d4d7a"))
(add-theme 'spacemacs
(make-instance 'theme
:fg purple
:bg grey
:border purple
:focus purple
:unfocus grey
:mode-line-fg purple
:mode-line-bg grey
:mode-line-border purple
:color-map-first grey
:color-map-last purple)))
(let ((fg "#ebdbb2")
(bg "#282828")
(border "#665c54"))
(add-theme 'gruvbox
(make-instance 'theme
:fg fg
:bg bg
:border border
:focus fg
:unfocus bg
:mode-line-fg fg
:mode-line-bg bg
:mode-line-border border
:color-map-first bg
:color-map-last fg)))