blob: a840681d15b398e5df62193c336dbb9a349180ef (
plain)
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
|
;;; mf-look-and-feel.el --- Look and feel configuration -*- lexical-binding: t -*-
;;; Code:
(defvar mf/light-theme 'modus-operandi)
(defvar mf/dark-theme 'modus-vivendi)
(defmacro mf/disable-if-bound (mode)
"Enable or disable MODE, based on ENABLE, if MODE is bound."
`(if (fboundp #',mode)
(,mode -1)))
(mf/disable-if-bound scroll-bar-mode) ; Scroll bars are awful
(mf/disable-if-bound tool-bar-mode) ; I don't need menus, I have 300 keybindings in my head
(mf/disable-if-bound menu-bar-mode)
(mf/disable-if-bound tooltip-mode) ; Disable tooltips
(mf/disable-if-bound blink-cursor-mode) ; Disable cursor blinking
(global-hl-line-mode) ; Highlight current line
(show-paren-mode) ; Highlight matching parentheses
(setq show-paren-delay 0
show-paren-style 'expression
inhibit-startup-message 1) ; No default startup message
(unless (display-graphic-p)
(set-terminal-coding-system 'utf-8-unix)) ; Use utf-8 in terminal emacs
(setq-default cursor-type 'bar
default-frame-alist (append '((font . "Fantasque Sans Mono:size=22")
(tool-bar-lines . 0)
(menu-bar-lines . 0)
(vertical-scroll-bars . nil)))
window-resize-pixelwise t
frame-resize-pixelwise t
initial-frame-alist default-frame-alist)
(add-hook 'window-configuration-change-hook
(lambda ()
(unless
(or (eq major-mode 'minibuffer-mode) (eq major-mode 'exwm-mode))
(set-window-margins (car (get-buffer-window-list (current-buffer) nil t)) 5 5))))
(set-face-background 'fringe (face-attribute 'default :background))
(window-divider-mode)
(winner-mode 1)
(setq display-buffer-alist
'(("\\*Async Shell Command\\*" (display-buffer-no-window))
("\\*eshell" (display-buffer-in-side-window display-buffer-reuse-window)
(side . right)
(window-width . 0.4)
(dedicated . t)
(slot . 1))
("\\*BBDB\\*" (display-buffer-no-window))
("\\*Calendar\\*" (display-buffer-in-side-window display-buffer-reuse-window)
(side . top)
(window-height . 0.2))
("\\*compilation\\*" (display-buffer-in-side-window display-buffer-reuse-window)
(side . bottom)
(window-height . 0.3)
(dedicated . t)
(slot . 0))
("\\*Flymake diagnostics for" (display-buffer-in-side-window)
(side . right)
(window-width . 0.4)
(slot . 1))
("\\*inferior-lisp\\*" (display-buffer-below-selected)
(window-height . 0.2))
("\\*sldb " (display-buffer-below-selected)
(window-height . 0.3))
("\\*Packages\\*" (display-buffer-in-side-window)
(side . bottom)
(window-height . 0.4))
("\\*\\(Wo\\)\?Man" (display-buffer-pop-up-window display-buffer-reuse-window))
("\\*[Hh]elp" (display-buffer-in-side-window display-buffer-reuse-window)
(side . left)
(window-width . 0.4)
(slot . 1))
("*Libera.Chat" (display-buffer-pop-up-window))
("\\*MPC-Songs\\*" (display-buffer-in-side-window)
(side . bottom)
(window-height . 0.4)
(slot . 0))
("\\*MPC Album|Playlists\\*" (display-buffer-in-side-window)
(side . bottom)
(window-height . 0.4)
(slot . 1))
("\\*Org Agenda\\*" (display-buffer-pop-up-window)
(window-width . 0.5)
(dedicated . t))
("\\*Agenda Commands\\*" (display-buffer-in-side-window)
(side . bottom)
(window-height . 0.4)
(slot . 1))
("\\*lsp-help\\*" (display-buffer-in-previous-window))
("\\*Org Select\\*" (display-buffer-in-side-window)
(side . bottom)
(window-height . 0.4)
(slot . 0))
("\\*Org Export Dispatcher\\*" (display-buffer-in-side-window)
(side . bottom)
(window-height . 0.4)
(slot . 1))
("\\*Org Todo\\*" (display-buffer-in-side-window)
(side . bottom)
(slot . 1))
("\\*org-roam\\*" (display-buffer-in-side-window)
(side . right)
(slot . 0)
(window-width . 0.33)
(dedicated . t))
("\\*vterm" (display-buffer-in-side-window display-buffer-reuse-window)
(side . right)
(window-width . 0.4)
(dedicated . t)
(slot . 0))
("\\*TAG DOCUMENTATION\\*" (display-buffer-in-side-window)
(side . left)
(slot . 1)
(window-width . 0.4))
("\\*Warnings\\*" (display-buffer-no-window)
(allow-no-window . t)))
switch-to-buffer-obey-display-actions t
switch-to-buffer-in-dedicated-window 'pop)
(require 'whitespace)
(setq whitespace-style '(face empty line-tail trailing)
whitespace-line-column 80)
(global-whitespace-mode)
(mf/install doom-themes)
(add-to-list 'custom-theme-load-path (concat user-emacs-directory "mf-lisp/themes/"))
(load-theme 'modus-operandi t)
(setq modus-themes-mode-line '(borderless accented)
modus-themes-paren-match '(intense bold))
(add-hook 'tty-setup-hook (lambda () (mf/switch-theme 'doom-nord)))
(setq ring-bell-function #'doom-themes-visual-bell-fn)
(require 'mf-modeline)
(provide 'mf-look-and-feel)
;;; mf-look-and-feel.el ends here
|