forked from magnars/.emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathappearance.el
220 lines (168 loc) · 6.21 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
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
;; make the fringe stand out from the background
(setq solarized-distinct-fringe-background t)
;; Don't change the font for some headings and titles
(setq solarized-use-variable-pitch nil)
;; make the modeline high contrast
(setq solarized-high-contrast-mode-line t)
;; Use less bolding
;(setq solarized-use-less-bold t)
;; Use more italics
(setq solarized-use-more-italic t)
;; Use less colors for indicators such as git:gutter, flycheck and similar
(setq solarized-emphasize-indicators nil)
;; Don't change size of org-mode headlines (but keep other size-changes)
(setq solarized-scale-org-headlines nil)
;; Avoid all font-size changes
(setq solarized-height-minus-1 1.0)
(setq solarized-height-plus-1 1.0)
(setq solarized-height-plus-2 1.0)
(setq solarized-height-plus-3 1.0)
(setq solarized-height-plus-4 1.0)
(set-terminal-parameter nil 'background-mode 'dark)
(setq frame-background-mode 'dark)
;;(setq solarized-termcolors 16)
(setq solarized-termcolors 256)
(setq serqqver-raise-frame nil)
(set-frame-parameter nil 'fullscreen 'fullboth)
(setq ns-use-srgb-colorspace t)
(defun gr-toggle-fullscreen ()
"Toggle full screen"
(interactive)
(set-frame-parameter
nil 'fullscreen
(when (not (frame-parameter nil 'fullscreen)) 'fullboth)))
(setq default-tab-width 4)
(setq bidi-display-reordering nil)
(setq bidi-paragraph-direction 'left-to-right)
(defface extra-whitespace-face
'((t (:background "pale green")))
"Used for tabs and such.")
(defvar gr-extra-keywords
'(("\t" . 'extra-whitespace-face)))
(defun gr-highlight-extra-whitespace ()
(interactive)
(font-lock-mode 1)
(font-lock-add-keywords nil gr-extra-keywords))
;;(add-hook 'text-mode-hook 'gr-highlight-extra-whitespace)
(defun gr-tab-higlight-add-font-lock ()
(font-lock-add-keywords nil '(("\t" 0 'trailing-whitespace prepend))))
;;(add-hook 'font-lock-mode-hook 'gr-tab-highlight-add-font-lock)
(setq visible-bell t
font-lock-maximum-decoration t
color-theme-is-global t
truncate-partial-width-windows nil)
;; Highlight matching parentheses when the point is on them.
(show-paren-mode 1)
;; No menu bars
(menu-bar-mode -1)
(transient-mark-mode 1)
(when nil
(require 'color-theme)
(when gr-on-24
(if gr-on-term
(ignore-errors (load-theme 'solarized-light t))
(ignore-errors (load-theme 'solarized-dark t)))))
(when gr-on-26
(require 'color-theme-solarized)
;;(color-theme-solarized-dark)
;;(color-theme-solarized-light)
)
(defun cursor-color (color) "set color even for new frames"
(interactive)
(add-hook 'window-setup-hook #'(lambda () (set-cursor-color color)))
(add-hook 'after-make-frame-functions #'(lambda (f) (with-selected-frame f (set-cursor-color color)))))
;(cursor-color "red") ; doesn't work with hl-line or what?
;;(require 'hl-line+)
;;(global-hl-line-mode t)
;;(toggle-hl-line-when-idle)
;;(set-face-background 'hl-line "#111144")
;;(set-face-background 'cursor "#111144") ; magic value same as hl-line makes grey? cool
;;(set-face-background 'cursor "#777777")
;;(set-face-background 'region "#222222")
;; Highlight in yasnippet
(ignore-errors (set-face-background 'yas-field-highlight-face "#333399"))
;; org-mode colors
(setq org-todo-keyword-faces
'(
("INPR" . (:foreground "yellow" :weight bold))
("DONE" . (:foreground "green" :weight bold))
("IMPEDED" . (:foreground "red" :weight bold))
))
(when nil
(set-face-background 'region "#464740")
;; Highlight current line
;; Customize background color of lighlighted line
(set-face-background 'hl-line "#222222")
;; Subtler highlight in magit
(set-face-background 'magit-item-highlight "#121212")
(set-face-foreground 'magit-diff-none "#666666")
(set-face-foreground 'magit-diff-add "#00cc33")
)
(when window-system
(setq frame-title-format '(buffer-file-name "%f" ("%b")))
(safe-wrap (turn-off-tool-bar))
(tooltip-mode -1)
(blink-cursor-mode -1))
(add-hook 'before-make-frame-hook 'turn-off-tool-bar)
;; Ditch them scrollbars
(when (fboundp 'scroll-bar-mode)
(scroll-bar-mode -1)
;; Make zooming affect frame instead of buffers
(require 'zoom-frm)
(require 'fit-frame)
(setq split-height-threshold nil)
(setq split-width-threshold nil)
)
(require 'avoid)
;;(require 'misc-fns)
(setq-default
sgml-quick-keys t
sgml-validate-command "tidy"
teach-extended-commands-p t
truncate-partial-width-windows nil
; mode-line-buffer-identification '("%12b [%f]")
indent-tabs-mode nil
ediff-window-setup-function 'ediff-setup-windows-plain
ediff-split-window-function 'split-window-horizontally
)
;;(global-auto-revert-mode 1)
(global-auto-revert-mode -1)
;; Enable these two supposedly "advanced" commands which come disabled by default.
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(delete-other-windows)
(split-window-horizontally)
(when (require 'rainbow-delimiters nil 'noerror)
(install-hook 'coding-hooks 'rainbow-delimiters-mode))
(defun my-find-file-check-make-large-file-read-only-hook ()
"If a file is over a given size, make the buffer read only."
(when (> (buffer-size) (* 10 1024 1024))
(setq buffer-read-only t)
(buffer-disable-undo)
(fundamental-mode)
; (message "Buffer is set to read-only because it is large. Undo also disabled.")
))
(add-hook 'find-file-hook 'my-find-file-check-make-large-file-read-only-hook)
;; Diminish modeline clutter
(require 'diminish)
(diminish 'wrap-region-mode)
;; (diminish 'yas/minor-mode)
(require 'tty-format)
(setq color-themes nil)
;;(load-theme 'solarized-dark t)
(ignore-errors (require 'color-theme-solarized))
;;(require 'solarized-light-high-contrast-theme)
;;(require 'solarized-wombat-dark-theme)
(ignore-errors (require 'solarized-dark-high-contrast-theme))
(ignore-errors (color-theme-solarized))
(ignore-errors (load-theme 'solarized-dark-high-contrast))
(setq whitespace-style '(trailing tabs newline tab-mark newline-mark))
;;(whitespace-mode)
(setq-default bidi-display-reordering nil)
(provide 'appearance)
(defvar my-solarized-theme
'("My solarized child theme."
(custom-theme-set-faces
theme-name
`(default ((,class (:background ,black)))))))
(provide 'my-solarized)