-
Notifications
You must be signed in to change notification settings - Fork 0
/
appearance.el
159 lines (135 loc) · 5.69 KB
/
appearance.el
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
;;; Line Numbers
(unless window-system ; Only when in non-GUI
(setq linum-format "%4d ")) ; Add spacing to the right of line numbers
(beacon-mode 1)
(defun reset-linum-heights ()
(interactive)
;; If you use nlinum or linum in org-mode, the larger headline sizes in some
;; themes could bleed into the line numbers. Fix this by setting :height
;; explicitly for your line number plugins, after you've loaded the
;; theme. e.g.
(let ((height (face-attribute 'default :height)))
;; for all linum/nlinum users
(set-face-attribute 'linum nil :height height)
;; only for `linum-relative' users:
;;(set-face-attribute 'linum-relative-current-face nil :height height)
;; only for `nlinum-relative' users:
;;(set-face-attribute 'nlinum-relative-current-face nil :height height)
))
(defun dark-background ()
(interactive)
(load-theme 'sanityinc-tomorrow-night t)
;; (load-theme 'doom-laserwave t)
;; (load-theme 'doom-outrun-electric t)
;; (reset-linum-heights)
(reset-term-colors))
(defun light-background ()
(interactive)
(load-theme 'sanityinc-tomorrow-day t)
(reset-term-colors))
(defun blue-background ()
(interactive)
(load-theme 'sanityinc-tomorrow-blue t)
(reset-term-colors))
(defun green-background ()
(interactive)
(load-theme 'base16-greenscreen t)
(reset-term-colors))
(defun organic-green-theme ()
(interactive)
(load-theme 'organic-green t)
(reset-term-colors))
(defun default-theme ()
(dark-background))
(defun set-fira-code-font ()
"Cf. <https://github.com/tonsky/FiraCode>
OSX:
brew tap homebrew/cask-fonts
brew install --cask font-fira-code
Ubuntu:
sudo apt-get install fonts-firacode
"
(interactive)
(when (window-system)
(set-default-font "Fira Code"))
(let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)")
(35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)")
(36 . ".\\(?:>\\)")
(37 . ".\\(?:\\(?:%%\\)\\|%\\)")
(38 . ".\\(?:\\(?:&&\\)\\|&\\)")
(42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)")
(43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)")
(45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)")
(46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)")
(47 . ".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)")
(48 . ".\\(?:x[a-zA-Z]\\)")
(58 . ".\\(?:::\\|[:=]\\)")
(59 . ".\\(?:;;\\|;\\)")
(60 . ".\\(?:\\(?:!--\\)\\|\\(?:~~\\|->\\|\\$>\\|\\*>\\|\\+>\\|--\\|<[<=-]\\|=[<=>]\\||>\\)\\|[*$+~/<=>|-]\\)")
(61 . ".\\(?:\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\)\\|[<=>~]\\)")
(62 . ".\\(?:\\(?:=>\\|>[=>-]\\)\\|[=>-]\\)")
(63 . ".\\(?:\\(\\?\\?\\)\\|[:=?]\\)")
(91 . ".\\(?:]\\)")
(92 . ".\\(?:\\(?:\\\\\\\\\\)\\|\\\\\\)")
(94 . ".\\(?:=\\)")
(119 . ".\\(?:ww\\)")
(123 . ".\\(?:-\\)")
(124 . ".\\(?:\\(?:|[=|]\\)\\|[=>|]\\)")
(126 . ".\\(?:~>\\|~~\\|[>=@~-]\\)"))))
(dolist (char-regexp alist)
(set-char-table-range composition-function-table (car char-regexp)
`([,(cdr char-regexp) 0 font-shape-gstring])))))
;;(set-fira-code-font)
(defun default-font-and-theme ()
(interactive)
(custom-set-faces
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil
:underline nil :slant normal :weight normal
:height 140 :width normal :family "Fira Code")))))
(default-theme))
(default-font-and-theme)
(defun slightly-bigger-font ()
(interactive)
(custom-set-faces
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil
:underline nil :slant normal :weight normal
:height 160 :width normal :family "Fira Code")))))
(default-theme))
(defun slightly-smaller-font ()
(interactive)
(custom-set-faces
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil
:underline nil :slant normal :weight normal
:height 120 :width normal :family "Fira Code")))))
(default-theme))
(defun present-to-everybody ()
(interactive)
(custom-set-faces
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil
:underline nil :slant normal :weight normal
:height 300 :width normal :family "Fira Code")))))
(light-background))
(defun msdos2k ()
(interactive)
(custom-set-faces
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil
:underline nil :slant normal :weight normal
:height 440 :width normal :family "Fira Code")))))
(default-theme))
(defun google-hangouts-sucks ()
(interactive)
(custom-set-faces
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil
:underline nil :slant normal :weight normal
:height 220 :width normal :family "Fira Code")))))
(light-background))
(defun google-meet-sucks ()
(interactive)
(google-hangouts-sucks))
(defun antman-uses-emacs ()
(interactive)
(custom-set-faces
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil
:underline nil :slant normal :weight normal
:height 80 :width normal :family "Fira Code")))))
(default-theme))