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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
|
;; |------------------------------------|
;; | Packages |
;; |------------------------------------|
(add-to-list 'load-path "~/.emacs.d/elisp/")
(require 'package)
(setq package-archives '(("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
;; Initialize use-package on non-Linux platforms
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
;; Ef-themes
(use-package ef-themes
:ensure t
:config
(setq ef-themes-headings
'((1 variable-pitch 1.5)
(2 regular 1.3)
(3 1.1)
(agenda-date 1.3)
(agenda-structure variable-pitch light 1.8)
(t variable-pitch)))
(defun bard/ef-themes-hl-todo-faces ()
"Configure `hl-todo-keyword-faces' with Ef themes colors.
The exact color values are taken from the active Ef theme."
(ef-themes-with-colors
(setq hl-todo-keyword-faces
`(("WAIT" . ,yellow)
("TODO" . ,red)
("NEXT" . ,blue)
("THEM" . ,magenta)
("PROG" . ,cyan-warmer)
("OKAY" . ,green-warmer)
("DONT" . ,yellow-warmer)
("FAIL" . ,red-warmer)
("BUG" . ,red-warmer)
("DONE" . ,green)
("NOTE" . ,blue-warmer)
("KLUDGE" . ,cyan)
("HACK" . ,cyan)
("TEMP" . ,red)
("FIXME" . ,red-warmer)
("XXX+" . ,red-warmer)
("KILLED" . ,cyan)
("REVIEW" . ,red)
("DEPRECATED" . ,yellow)))))
(add-hook 'ef-themes-post-load-hook #'bard/ef-themes-hl-todo-faces)
(define-key global-map (kbd "M-<f5>") #'ef-themes-toggle)
(setq ef-themes-to-toggle '(ef-winter ef-frost))
;; (load-theme 'ef-winter)
)
(use-package modus-themes
:ensure t
:config
(setq modus-themes-headings
'((1 . (variable-pitch 1.5))
(2 . (regular 1.3))
(agenda-date . (1.3))
(agenda-structure . (variable-pitch light 1.8))
(t . (1.1))))
(defun bard/modus-themes-hl-todo-faces ()
"Configure `hl-todo-keyword-faces' with Modus themes colors.
The exact color values are taken from the active Ef theme."
(modus-themes-with-colors
(setq hl-todo-keyword-faces
`(("WAIT" . ,yellow)
("TODO" . ,red)
("NEXT" . ,blue)
("THEM" . ,magenta)
("PROG" . ,cyan-warmer)
("OKAY" . ,green-warmer)
("DONT" . ,yellow-warmer)
("FAIL" . ,red-warmer)
("BUG" . ,red-warmer)
("DONE" . ,green)
("NOTE" . ,blue-warmer)
("KLUDGE" . ,cyan)
("HACK" . ,cyan)
("TEMP" . ,red)
("FIXME" . ,red-warmer)
("XXX+" . ,red-warmer)
("REVIEW" . ,red)
("KILLED" . ,cyan)
("DEPRECATED" . ,yellow)))))
(add-hook 'modus-themes-post-load-hook #'bard/modus-themes-hl-todo-faces)
(setq modus-themes-to-toggle '(modus-vivendi modus-operandi-tinted))
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
(load-theme 'modus-vivendi t))
(use-package fontaine
:ensure t)
(use-package rainbow-mode
:ensure t)
(use-package mixed-pitch
:ensure t
;; :hook
;; (olivetti-mode . mixed-pitch-mode)
:config
(with-eval-after-load mixed-pitch-mode
(setq mixed-pitch-cursor-type nil)))
;; Multiple Cursors
(use-package multiple-cursors
:ensure t)
;; Magit
(use-package magit
:ensure t)
(use-package magit-todos
:ensure t
:config
(magit-todos-mode 1))
;; Vertico completion
(use-package vertico
:ensure t
:init
(vertico-mode 1))
;; Marginalia - works with vertico
(use-package marginalia
:ensure t
:init
(marginalia-mode))
(use-package company
:ensure t
:init
(global-company-mode 1))
(use-package consult
:ensure t
:config
(global-set-key (kbd "C-x b") nil)
(global-set-key (kbd "C-x b") #'consult-buffer)
(global-set-key (kbd "C-c s") #'consult-line)
(global-set-key (kbd "C-c C-s") nil)
(global-set-key (kbd "C-z s") #'consult-ripgrep))
(use-package yasnippet
:init
(yas-global-mode)
:ensure t)
(use-package yasnippet-snippets
:ensure t)
(use-package which-key
:init
(which-key-mode 1)
:ensure t)
(use-package org-roam
:ensure t
:custom
(org-roam-directory (file-truename "~/Notes/Org-Roam"))
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph)
("C-c n i" . org-roam-node-insert)
("C-c n c" . org-roam-capture)
("C-c n j" . org-roam-dailies-capture-today))
:config
(org-roam-db-autosync-mode 1))
(use-package org-roam-ui
:ensure t)
(use-package org-fragtog
:ensure t)
(use-package orderless
:ensure t
:custom
(completion-styles '(orderless basic))
(completion-category-overrides '((file (styles basic partial-completion)))))
(use-package dashboard
:ensure t
:config
(setq initial-buffer-choice 'dashboard-open)
(dashboard-setup-startup-hook)
(setq dashboard-startup-banner "~/.emacs.d/img/catwithscarf.jpg")
(setq dashboard-banner-logo-width 50)
(setq dashboard-banner-logo-height 50)
(setq dashboard-center-content t)
(setq dashboard-items '((recents . 5)
(agenda . 5)))
(setq dashboard-banner-logo-title "Слава богу ты вернулся")
(setq dashboard-set-footer nil)
(setq dashboard-set-init-info nil))
(use-package elfeed
:ensure t
:config
(global-set-key (kbd "C-c e") 'elfeed)
(setq elfeed-search-filter "+unread -academia"))
(use-package elfeed-org
:ensure t
:init
(elfeed-org)
:config
(setq rmh-elfeed-org-files (list "~/.emacs.d/feeds.org"
"~/.emacs.d/youtube.org")))
(use-package elfeed-goodies
:ensure t
:init
(elfeed-goodies/setup)
:config
(setq elfeed-goodies/powerline-default-separator 'box))
(use-package notmuch
:ensure t
:config
(define-key global-map (kbd "C-c m") #'notmuch))
(use-package notmuch-indicator
:ensure t
:config)
(use-package tmr
:ensure t
:config
;; Set to nil to disable the sound
(setq tmr-sound-file "/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga")
;; Desktop notification urgency level
(setq tmr-notification-urgency 'normal)
(setq tmr-descriptions-list 'tmr-description-history)
(define-key global-map (kbd "M-<f8>") 'tmr-tabulated-view)
(define-key global-map (kbd "<f8>") 'tmr-with-description))
(use-package hl-todo
:ensure t
:init
(global-hl-todo-mode t))
(use-package pdf-tools
:ensure t)
(use-package org-timeblock
:ensure t
:config
(define-key global-map (kbd "M-<f6>") 'org-timeblock))
(use-package orthodox-christian-new-calendar-holidays
:ensure t
:config
(setq holiday-other-holidays (append holiday-other-holidays orthodox-christian-new-calendar-holidays))
(setq holiday-bahai-holidays nil
holiday-christian-holidays nil
holiday-islamic-holidays nil))
(use-package expand-region
:ensure t
:bind ("C-=" . er/expand-region))
(use-package clojure-mode
:ensure t)
(use-package cider
:ensure t)
(use-package clojure-snippets
:ensure t)
(use-package haskell-mode
:ensure t)
(use-package ada-mode
:ensure t)
(use-package gpr-mode
:ensure t)
(use-package gpr-query
:ensure t)
(use-package flycheck
:ensure t
:init
(global-flycheck-mode t))
(use-package smartparens
:ensure t
:config
(smartparens-global-mode t)
(show-smartparens-global-mode t)
:bind
(("C-<down>" . sp-down-sexp))
("C-<up>" . sp-up-sexp)
("M-<down>" . sp-backward-up-sexp)
("M-<up>" . sp-backward-up-sexp)
("C-M-a" . sp-beginning-of-sexp)
("C-M-e" . sp-end-of-sexp))
(use-package ggtags
:ensure t
:config
(add-hook 'c-mode-common-hook
(lambda ()
(when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
(ggtags-mode 1)))))
(use-package tramp
:ensure t)
(use-package circe
:ensure t)
(use-package spacious-padding
:ensure t
:init
;; (spacious-padding-mode 1)
:config
(setq spacious-padding-widths
'( :internal-border-width 10
:header-line-width 4
:mode-line-width 6
:tab-width 4
:right-divider-width 30
:scroll-bar-width 8)))
(use-package darkroom
:ensure t
:bind
(("<f9>" . bard/darkroom-toggle))
:config
(setq darkroom-margins 'darkroom-guess-margins)
(setq darkroom-text-scale-increase 1.2)
(defun bard/darkroom-toggle ()
(interactive)
(if (equal darkroom-tentative-mode nil)
(progn
(visual-line-mode t)
(darkroom-tentative-mode t)
(setq cursor-type 'bar)
)
(progn
(darkroom-tentative-mode 0)
(mixed-pitch-mode 0)
(visual-line-mode nil)
;; (fringe-mode nil)
(setq cursor-type 'box)))))
(provide 'bard-emacs-package.el)
|