diff options
-rw-r--r-- | Desktop.org | 525 | ||||
-rw-r--r-- | Emacs.org | 1091 | ||||
-rw-r--r-- | Mail.org | 142 |
3 files changed, 0 insertions, 1758 deletions
diff --git a/Desktop.org b/Desktop.org deleted file mode 100644 index 595e278..0000000 --- a/Desktop.org +++ /dev/null | |||
@@ -1,525 +0,0 @@ | |||
1 | #+title: Desktop Configuration | ||
2 | #+author: jdlugosz963 | ||
3 | #+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/exwm/desktop.el | ||
4 | |||
5 | |||
6 | * EXWM | ||
7 | ** Config | ||
8 | |||
9 | #+begin_src emacs-lisp | ||
10 | |||
11 | (defun jd/exwm-update-class () | ||
12 | (exwm-workspace-rename-buffer exwm-class-name)) | ||
13 | |||
14 | (defun jd-exwm/run-in-background (command) | ||
15 | (let ((command-parts (split-string command "[ ]+"))) | ||
16 | (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) | ||
17 | |||
18 | (defun jd-exwm/restart-process (program-name) | ||
19 | (call-process "killall" nil nil nil program-name) | ||
20 | (jd-exwm/run-in-background program-name)) | ||
21 | |||
22 | (defun jd-exwm/exwm-init-hook () | ||
23 | (jd-exwm/run-in-background "nitrogen --restore") | ||
24 | (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1") | ||
25 | (start-process-shell-command "syndaemon" nil "syndaemon -i 0.8 -K -R -d") | ||
26 | |||
27 | (jd-exwm/restart-process "polybar") | ||
28 | (jd-exwm/restart-process "nm-applet") | ||
29 | (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") | ||
30 | (jd-exwm/restart-process "blueman-applet")) | ||
31 | |||
32 | (defun jd-exwm/exwm-update-title () | ||
33 | (exwm-workspace-rename-buffer exwm-title)) | ||
34 | |||
35 | (defun jd-exwm/configure-window-by-class () | ||
36 | (interactive) | ||
37 | (pcase exwm-class-name | ||
38 | ("firefox" (exwm-workspace-move-window 2)) | ||
39 | ("Brave" (exwm-workspace-move-window 2)) | ||
40 | ("qutebrowser" (exwm-workspace-move-window 2)) | ||
41 | ("discord" (exwm-workspace-move-window 5)) | ||
42 | ("obs" (exwm-workspace-move-window 5)) | ||
43 | ("Virt-manager" (exwm-workspace-move-window 4)))) | ||
44 | |||
45 | (use-package exwm | ||
46 | :config | ||
47 | (setq exwm-workspace-number 10) | ||
48 | |||
49 | (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) | ||
50 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) | ||
51 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) | ||
52 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) | ||
53 | |||
54 | (require 'exwm-randr) | ||
55 | (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) | ||
56 | (exwm-randr-enable) | ||
57 | |||
58 | (setq exwm-input-simulation-keys | ||
59 | '(([?\C-h] . [left]) | ||
60 | ([?\C-l] . [right]) | ||
61 | ([?\C-k] . [up]) | ||
62 | ([?\C-j] . [down]))) | ||
63 | |||
64 | (setq exwm-input-prefix-keys | ||
65 | '(?\C-x | ||
66 | ?\C-u | ||
67 | ?\C-h | ||
68 | ?\M-x | ||
69 | ?\M-` | ||
70 | ?\M-& | ||
71 | ?\M-: | ||
72 | ?\C-\M-j | ||
73 | ?\C-\ )) | ||
74 | |||
75 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) | ||
76 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) | ||
77 | |||
78 | (setq exwm-input-global-keys | ||
79 | `(([?\s-R] . exwm-reset) | ||
80 | |||
81 | |||
82 | ([?\s-r] . (lambda (command) | ||
83 | (interactive (list (read-shell-command "$ "))) | ||
84 | (start-process-shell-command command nil command))) | ||
85 | |||
86 | ([?\s-W] . exwm-workspace-move-window) | ||
87 | ([?\s-w] . exwm-workspace-switch) | ||
88 | |||
89 | ,@(mapcar (lambda (i) | ||
90 | `(,(kbd (format "s-%d" i)) . | ||
91 | (lambda () | ||
92 | (interactive) | ||
93 | (exwm-workspace-switch-create ,i)))) | ||
94 | (number-sequence 0 9)))) | ||
95 | |||
96 | (exwm-enable)) | ||
97 | |||
98 | #+end_src | ||
99 | ** Desktop mode | ||
100 | |||
101 | #+begin_src emacs-lisp | ||
102 | |||
103 | (use-package desktop-environment | ||
104 | :after exwm | ||
105 | :config (desktop-environment-mode) | ||
106 | :custom | ||
107 | (desktop-environment-brightness-small-increment "2%+") | ||
108 | (desktop-environment-brightness-small-decrement "2%-") | ||
109 | (desktop-environment-brightness-normal-increment "5%+") | ||
110 | (desktop-environment-brightness-normal-decrement "5%-")) | ||
111 | |||
112 | #+end_src | ||
113 | |||
114 | ** Transparency | ||
115 | |||
116 | #+begin_src emacs-lisp | ||
117 | |||
118 | (set-frame-parameter (selected-frame) 'alpha '(90 . 90)) | ||
119 | (add-to-list 'default-frame-alist `(alpha . (90 . 90))) | ||
120 | (set-frame-parameter (selected-frame) 'fullscreen 'maximized) | ||
121 | (add-to-list 'default-frame-alist '(fullscreen . maximized)) | ||
122 | |||
123 | #+end_src | ||
124 | |||
125 | ** Update colorsheme | ||
126 | #+begin_src emacs-lisp | ||
127 | |||
128 | (defun jd-exwm/get-color (ATTRIBUTE) | ||
129 | (face-attribute 'default ATTRIBUTE)) | ||
130 | |||
131 | (defun theme-to-xresources () | ||
132 | (interactive) | ||
133 | (require 'term) | ||
134 | (with-temp-buffer | ||
135 | (insert "! Generated by theme-to-xresources\n") | ||
136 | (dolist (spec | ||
137 | '(("emacs.background" :background "E6") | ||
138 | ("emacs.foreground" :foreground ""))) | ||
139 | (let ((color (jd-exwm/get-color (cadr spec)))) | ||
140 | (insert (format "%s: #%s%s\n" | ||
141 | (car spec) | ||
142 | (caddr spec) | ||
143 | (string-remove-prefix "#" color)))) | ||
144 | (write-region (point-min) (point-max) "~/.Xresources"))) | ||
145 | (call-process "xrdb" nil nil nil "-merge" (expand-file-name "~/.Xresources"))) | ||
146 | |||
147 | (defun jd/theme-sync () | ||
148 | (interactive) | ||
149 | (theme-to-xresources) | ||
150 | (setq org-confirm-babel-evaluate nil) | ||
151 | (org-babel-tangle-file "~/dotfiles/Desktop.org") | ||
152 | (setq org-confirm-babel-evaluate 't) | ||
153 | (call-process "killall" nil nil nil "dunst") ;; TODO: prevent clear notification history | ||
154 | (jd-exwm/restart-process "polybar")) | ||
155 | |||
156 | (add-hook 'jd/load-theme-hook #'jd/theme-sync) | ||
157 | (add-hook 'exwm-init-hook #'jd/theme-sync) | ||
158 | |||
159 | |||
160 | #+end_src | ||
161 | ** Start emacs | ||
162 | |||
163 | #+begin_src sh :tangle ~/.config/emacs/exwm/start.sh | ||
164 | #!/bin/sh | ||
165 | |||
166 | picom & | ||
167 | |||
168 | xss-lock -- slock & | ||
169 | |||
170 | export VISUAL="emacsclient -a vim" | ||
171 | export EDITOR="$VISUAL" | ||
172 | export GTK_THEME="Adwaita:dark" | ||
173 | export CALIBRE_USE_DARK_PALETTE=1 | ||
174 | |||
175 | gentoo-pipewire-launcher & | ||
176 | |||
177 | exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el | ||
178 | |||
179 | #+end_src | ||
180 | |||
181 | * Dunst | ||
182 | *Dunst keybinds in Emacs* | ||
183 | |||
184 | #+begin_src emacs-lisp | ||
185 | |||
186 | (defun jd/dunst-show-history () | ||
187 | (interactive) | ||
188 | (start-process-shell-command "dunstctl" nil "dunstctl history-pop")) | ||
189 | |||
190 | (defun jd/dunst-close () | ||
191 | (interactive) | ||
192 | (start-process-shell-command "dunstctl" nil "dunstctl close")) | ||
193 | |||
194 | (defun jd/dunst-close-all () | ||
195 | (interactive) | ||
196 | (start-process-shell-command "dunstctl" nil "dunstctl close-all")) | ||
197 | |||
198 | (jd/leader-key-def | ||
199 | "d" '(nil :which-key "dunst") | ||
200 | "dh" '(jd/dunst-show-history :which-key "show history") | ||
201 | "dc" '(jd/dunst-close :which-key "close") | ||
202 | "da" '(jd/dunst-close-all :which-key "close all")) | ||
203 | |||
204 | #+end_src | ||
205 | |||
206 | *Get emacs colors* | ||
207 | #+NAME: get-color | ||
208 | #+BEGIN_SRC elisp :var ATTR="" :tangle no :eval yes | ||
209 | (if (and (stringp ATTR) (s-prefix-p ":" ATTR)) | ||
210 | (jd-exwm/get-color (intern ATTR)) | ||
211 | "") | ||
212 | #+END_SRC | ||
213 | |||
214 | *dunstrc* | ||
215 | |||
216 | #+begin_src conf :tangle .config/dunst/dunstrc :noweb yes :eval yes | ||
217 | |||
218 | [global] | ||
219 | frame_width = 2 | ||
220 | frame_color = "<<get-color(":foreground")>>" | ||
221 | font = sourcecodepro | ||
222 | |||
223 | # Allow a small subset of html markup: | ||
224 | # <b>bold</b> | ||
225 | # <i>italic</i> | ||
226 | # <s>strikethrough</s> | ||
227 | # <u>underline</u> | ||
228 | # | ||
229 | # For a complete reference see | ||
230 | # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>. | ||
231 | # If markup is not allowed, those tags will be stripped out of the | ||
232 | # message. | ||
233 | markup = yes | ||
234 | |||
235 | # The format of the message. Possible variables are: | ||
236 | # %a appname | ||
237 | # %s summary | ||
238 | # %b body | ||
239 | # %i iconname (including its path) | ||
240 | # %I iconname (without its path) | ||
241 | # %p progress value if set ([ 0%] to [100%]) or nothing | ||
242 | # Markup is allowed | ||
243 | format = "%s %p\n%b" | ||
244 | |||
245 | # Sort messages by urgency. | ||
246 | sort = yes | ||
247 | |||
248 | # Show how many messages are currently hidden (because of geometry). | ||
249 | indicate_hidden = yes | ||
250 | |||
251 | # Alignment of message text. | ||
252 | # Possible values are "left", "center" and "right". | ||
253 | alignment = left | ||
254 | |||
255 | # The frequency with wich text that is longer than the notification | ||
256 | # window allows bounces back and forth. | ||
257 | # This option conflicts with "word_wrap". | ||
258 | # Set to 0 to disable. | ||
259 | bounce_freq = 5 | ||
260 | |||
261 | |||
262 | # Show age of message if message is older than show_age_threshold | ||
263 | # seconds. | ||
264 | # Set to -1 to disable. | ||
265 | show_age_threshold = 60 | ||
266 | |||
267 | # Split notifications into multiple lines if they don't fit into | ||
268 | # geometry. | ||
269 | word_wrap = no | ||
270 | |||
271 | # Ignore newlines '\n' in notifications. | ||
272 | ignore_newline = no | ||
273 | |||
274 | |||
275 | # The geometry of the window: | ||
276 | # [{width}]x{height}[+/-{x}+/-{y}] | ||
277 | # The geometry of the message window. | ||
278 | # The height is measured in number of notifications everything else | ||
279 | # in pixels. If the width is omitted but the height is given | ||
280 | # ("-geometry x2"), the message window expands over the whole screen | ||
281 | # (dmenu-like). If width is 0, the window expands to the longest | ||
282 | # message displayed. A positive x is measured from the left, a | ||
283 | # negative from the right side of the screen. Y is measured from | ||
284 | # the top and down respectevly. | ||
285 | # The width can be negative. In this case the actual width is the | ||
286 | # screen width minus the width defined in within the geometry option. | ||
287 | geometry = "500x10-10+50" | ||
288 | |||
289 | # Shrink window if it's smaller than the width. Will be ignored if | ||
290 | # width is 0. | ||
291 | shrink = yes | ||
292 | |||
293 | # The transparency of the window. Range: [0; 100]. | ||
294 | # This option will only work if a compositing windowmanager is | ||
295 | # present (e.g. xcompmgr, compiz, etc.). | ||
296 | transparency = 15 | ||
297 | |||
298 | # Don't remove messages, if the user is idle (no mouse or keyboard input) | ||
299 | # for longer than idle_threshold seconds. | ||
300 | # Set to 0 to disable. | ||
301 | # default 120 | ||
302 | idle_threshold = 120 | ||
303 | |||
304 | # Which monitor should the notifications be displayed on. | ||
305 | monitor = 0 | ||
306 | |||
307 | # Display notification on focused monitor. Possible modes are: | ||
308 | # mouse: follow mouse pointer | ||
309 | # keyboard: follow window with keyboard focus | ||
310 | # none: don't follow anything | ||
311 | # | ||
312 | # "keyboard" needs a windowmanager that exports the | ||
313 | # _NET_ACTIVE_WINDOW property. | ||
314 | # This should be the case for almost all modern windowmanagers. | ||
315 | # | ||
316 | # If this option is set to mouse or keyboard, the monitor option | ||
317 | # will be ignored. | ||
318 | follow = mouse | ||
319 | |||
320 | # Should a notification popped up from history be sticky or timeout | ||
321 | # as if it would normally do. | ||
322 | sticky_history = yes | ||
323 | |||
324 | # Maximum amount of notifications kept in history | ||
325 | history_length = 20 | ||
326 | |||
327 | # Display indicators for URLs (U) and actions (A). | ||
328 | show_indicators = yes | ||
329 | |||
330 | # The height of a single line. If the height is smaller than the | ||
331 | # font height, it will get raised to the font height. | ||
332 | # This adds empty space above and under the text. | ||
333 | line_height = 0 | ||
334 | |||
335 | # Draw a line of "separator_height" pixel height between two | ||
336 | # notifications. | ||
337 | # Set to 0 to disable. | ||
338 | separator_height = 1 | ||
339 | |||
340 | # Padding between text and separator. | ||
341 | # padding = 8 | ||
342 | padding = 8 | ||
343 | |||
344 | # Horizontal padding. | ||
345 | horizontal_padding = 10 | ||
346 | |||
347 | # Define a color for the separator. | ||
348 | # possible values are: | ||
349 | # * auto: dunst tries to find a color fitting to the background; | ||
350 | # * foreground: use the same color as the foreground; | ||
351 | # * frame: use the same color as the frame; | ||
352 | # * anything else will be interpreted as a X color. | ||
353 | separator_color = #263238 | ||
354 | |||
355 | # Print a notification on startup. | ||
356 | # This is mainly for error detection, since dbus (re-)starts dunst | ||
357 | # automatically after a crash. | ||
358 | startup_notification = false | ||
359 | |||
360 | # dmenu path. | ||
361 | dmenu = /usr/bin/dmenu -p dunst: | ||
362 | |||
363 | # Browser for opening urls in context menu. | ||
364 | browser = palemoon | ||
365 | |||
366 | # Align icons left/right/off | ||
367 | icon_position = left | ||
368 | |||
369 | # Limit icons size. | ||
370 | max_icon_size=128 | ||
371 | |||
372 | [urgency_low] | ||
373 | # IMPORTANT: colors have to be defined in quotation marks. | ||
374 | # Otherwise the "#" and following would be interpreted as a comment. | ||
375 | background = "<<get-color(":background")>>" | ||
376 | foreground = "#888888" | ||
377 | timeout = 10 | ||
378 | # Icon for notifications with low urgency, uncomment to enable | ||
379 | #icon = /path/to/icon | ||
380 | |||
381 | [urgency_normal] | ||
382 | background = "<<get-color(":background")>>" | ||
383 | foreground = "<<get-color(":foreground")>>" | ||
384 | timeout = 10 | ||
385 | # Icon for notifications with normal urgency, uncomment to enable | ||
386 | #icon = /path/to/icon | ||
387 | |||
388 | [urgency_critical] | ||
389 | background = "#900000" | ||
390 | foreground = "#ffffff" | ||
391 | frame_color = "#ff0000" | ||
392 | timeout = 0 | ||
393 | # Icon for notifications with critical urgency, uncomment to enable | ||
394 | #icon = /path/to/icon | ||
395 | #+end_src | ||
396 | |||
397 | * Polybar | ||
398 | |||
399 | #+begin_src conf :tangle .config/polybar/config.ini | ||
400 | |||
401 | [settings] | ||
402 | screenchange-reload = true | ||
403 | pseudo-transparency = true | ||
404 | |||
405 | [colors] | ||
406 | background = ${xrdb:emacs.background} | ||
407 | foreground = ${xrdb:emacs.foreground} | ||
408 | primary = #7fd962 | ||
409 | disabled = #707880 | ||
410 | |||
411 | [bar/example] | ||
412 | width = 100% | ||
413 | height = 18pt | ||
414 | |||
415 | background = ${colors.background} | ||
416 | foreground = ${colors.foreground} | ||
417 | |||
418 | line-size = 1.5pt | ||
419 | |||
420 | padding-left = 0 | ||
421 | padding-right = 1 | ||
422 | |||
423 | module-margin = 1 | ||
424 | |||
425 | separator = | | ||
426 | separator-foreground = ${colors.disabled} | ||
427 | |||
428 | font-0 = "sourcecodepro:size=11" | ||
429 | font-1 = "FontAwesome" | ||
430 | |||
431 | modules-left = xworkspaces | ||
432 | modules-right = memory cpu battery date | ||
433 | |||
434 | cursor-click = pointer | ||
435 | cursor-scroll = ns-resize | ||
436 | |||
437 | enable-ipc = true | ||
438 | |||
439 | tray-position = right | ||
440 | |||
441 | [module/xworkspaces] | ||
442 | type = internal/xworkspaces | ||
443 | |||
444 | icon-0 = 1;0 | ||
445 | icon-1 = 2;1 | ||
446 | icon-2 = 3;2 | ||
447 | icon-3 = 4;3 | ||
448 | icon-4 = 5;4 | ||
449 | icon-5 = 6;5 | ||
450 | icon-6 = 7;6 | ||
451 | icon-7 = 8;7 | ||
452 | icon-8 = 9;8 | ||
453 | icon-9 = 10;9 | ||
454 | |||
455 | label-active = %icon% | ||
456 | label-active-background = ${colors.background-alt} | ||
457 | label-active-underline= ${colors.primary} | ||
458 | label-active-padding = 1 | ||
459 | |||
460 | label-occupied = %icon% | ||
461 | label-occupied-padding = 1 | ||
462 | |||
463 | label-urgent = %icon% | ||
464 | label-urgent-background = ${colors.alert} | ||
465 | label-urgent-padding = 1 | ||
466 | |||
467 | label-empty = %icon% | ||
468 | label-empty-foreground = ${colors.disabled} | ||
469 | label-empty-padding = 1 | ||
470 | |||
471 | [module/battery] | ||
472 | type = internal/battery | ||
473 | battery = BAT0 | ||
474 | adapter = ADP1 | ||
475 | |||
476 | format-charging = <animation-charging> <label-charging> | ||
477 | format-discharging = <ramp-capacity> <label-discharging> | ||
478 | format-low = <ramp-capacity> <label-low> | ||
479 | format-full = <ramp-capacity> <label-full> | ||
480 | |||
481 | label-charging = %percentage%% | ||
482 | label-discharging = %percentage%% | ||
483 | label-low = LOW %percentage%% | ||
484 | label-full = FULL %percentage%% | ||
485 | |||
486 | ramp-capacity-0 = | ||
487 | ramp-capacity-1 = | ||
488 | ramp-capacity-2 = | ||
489 | ramp-capacity-3 = | ||
490 | ramp-capacity-4 = | ||
491 | ramp-capacity-foreground = ${colors.primary} | ||
492 | |||
493 | animation-charging-0 = | ||
494 | animation-charging-1 = | ||
495 | animation-charging-2 = | ||
496 | animation-charging-3 = | ||
497 | animation-charging-4 = | ||
498 | animation-charging-foreground = ${colors.primary} | ||
499 | animation-charging-framerate = 750 | ||
500 | |||
501 | [module/memory] | ||
502 | type = internal/memory | ||
503 | interval = 2 | ||
504 | format-prefix = "RAM " | ||
505 | format-prefix-foreground = ${colors.primary} | ||
506 | label = %percentage_used:2%% | ||
507 | |||
508 | [module/cpu] | ||
509 | type = internal/cpu | ||
510 | interval = 2 | ||
511 | format-prefix = "CPU " | ||
512 | format-prefix-foreground = ${colors.primary} | ||
513 | label = %percentage:2%% | ||
514 | |||
515 | [module/date] | ||
516 | type = internal/date | ||
517 | interval = 1 | ||
518 | |||
519 | date = %H:%M | ||
520 | date-alt = %Y-%m-%d %H:%M:%S | ||
521 | |||
522 | label = %date% | ||
523 | label-foreground = ${colors.primary} | ||
524 | |||
525 | #+end_src | ||
diff --git a/Emacs.org b/Emacs.org deleted file mode 100644 index 536aa85..0000000 --- a/Emacs.org +++ /dev/null | |||
@@ -1,1091 +0,0 @@ | |||
1 | #+author: jdlugosz963 | ||
2 | #+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/init.el | ||
3 | |||
4 | * Table of contents :toc: | ||
5 | - [[#startup-performance][Startup Performance]] | ||
6 | - [[#on-startup][On startup]] | ||
7 | - [[#user-information-setup][User information setup]] | ||
8 | - [[#stay-clean][Stay clean]] | ||
9 | - [[#package-setup][Package setup]] | ||
10 | - [[#keyboard-setup][Keyboard Setup]] | ||
11 | - [[#general-setup][General Setup]] | ||
12 | - [[#evil-mode-setup][Evil mode setup]] | ||
13 | - [[#ui-configuration][UI Configuration]] | ||
14 | - [[#basic-ui-setup][Basic UI setup]] | ||
15 | - [[#hl-todo][Hl todo]] | ||
16 | - [[#ivy-and-counsel][Ivy and Counsel]] | ||
17 | - [[#which-key][Which key]] | ||
18 | - [[#modline][Modline]] | ||
19 | - [[#hydra][Hydra]] | ||
20 | - [[#beacon][Beacon]] | ||
21 | - [[#other-keybindings][Other Keybindings]] | ||
22 | - [[#org][Org]] | ||
23 | - [[#org-mode-setup][Org-mode setup]] | ||
24 | - [[#org-evil][Org evil]] | ||
25 | - [[#org-make-toc][Org make toc]] | ||
26 | - [[#org-fonts][Org fonts]] | ||
27 | - [[#org-tempo-setup][Org tempo setup]] | ||
28 | - [[#org-babel-setup][Org babel setup]] | ||
29 | - [[#org-margin][Org margin]] | ||
30 | - [[#org-superstar][Org superstar]] | ||
31 | - [[#org-roam][Org roam]] | ||
32 | - [[#langtoolel][langtool.el]] | ||
33 | - [[#development][Development]] | ||
34 | - [[#languages][Languages]] | ||
35 | - [[#company][Company]] | ||
36 | - [[#projectile][Projectile]] | ||
37 | - [[#neotree][Neotree]] | ||
38 | - [[#magit][Magit]] | ||
39 | - [[#apps][Apps]] | ||
40 | - [[#vterm][Vterm]] | ||
41 | - [[#dired][Dired]] | ||
42 | - [[#emms][EMMS]] | ||
43 | - [[#pdf-tools][PDF Tools]] | ||
44 | - [[#mu4e][Mu4e]] | ||
45 | - [[#rss][RSS]] | ||
46 | - [[#custom][Custom]] | ||
47 | - [[#runtime-performance][Runtime Performance]] | ||
48 | |||
49 | * Startup Performance | ||
50 | |||
51 | #+begin_src emacs-lisp | ||
52 | |||
53 | (setq gc-cons-threshold (* 50 1000 1000)) | ||
54 | |||
55 | (defun jd/display-startup-time () | ||
56 | (message "Emacs loaded in %s with %d garbage collections." | ||
57 | (format "%.2f seconds" | ||
58 | (float-time | ||
59 | (time-subtract after-init-time before-init-time))) | ||
60 | gcs-done)) | ||
61 | |||
62 | #+end_src | ||
63 | |||
64 | * On startup | ||
65 | =jd/startup= function will be invoke after emacs startup | ||
66 | |||
67 | #+begin_src emacs-lisp | ||
68 | (defun jd/startup () | ||
69 | (electric-pair-mode 1) | ||
70 | (global-company-mode 1) | ||
71 | (jd/display-startup-time)) | ||
72 | |||
73 | (add-hook 'emacs-startup-hook #'jd/startup) | ||
74 | #+end_src | ||
75 | |||
76 | * User information setup | ||
77 | |||
78 | #+begin_src emacs-lisp | ||
79 | |||
80 | (setq user-full-name "Jakub Dlugosz" | ||
81 | user-mail-address "jdlugosz963@gmail.com") | ||
82 | |||
83 | #+end_src | ||
84 | |||
85 | * Stay clean | ||
86 | |||
87 | #+begin_src emacs-lisp | ||
88 | |||
89 | (setq backup-directory-alist '(("." . "~/.cache/emacs/backup")) | ||
90 | backup-by-copying t | ||
91 | version-control t | ||
92 | delete-old-versions t | ||
93 | kept-new-versions 20 | ||
94 | kept-old-versions 5) | ||
95 | |||
96 | (setq user-emacs-directory "~/.cache/emacs") | ||
97 | |||
98 | #+end_src | ||
99 | |||
100 | * Package setup | ||
101 | |||
102 | #+begin_src emacs-lisp | ||
103 | |||
104 | (require 'package) | ||
105 | (setq package-archives '(("melpa" . "https://melpa.org/packages/") | ||
106 | ("org" . "https://orgmode.org/elpa/") | ||
107 | ("gnu-devel" . "https://elpa.gnu.org/devel/") | ||
108 | ("elpa" . "https://elpa.gnu.org/packages/"))) | ||
109 | (package-initialize) | ||
110 | |||
111 | (unless package-archive-contents | ||
112 | (package-refresh-contents)) | ||
113 | |||
114 | (unless (package-installed-p 'use-package) | ||
115 | (package-install 'use-package)) | ||
116 | |||
117 | (setq use-package-always-ensure t) | ||
118 | |||
119 | (add-to-list 'load-path ".config/emacs/jd/") | ||
120 | |||
121 | (require 'use-package) | ||
122 | |||
123 | #+end_src | ||
124 | |||
125 | * Keyboard Setup | ||
126 | ** General Setup | ||
127 | |||
128 | #+begin_src emacs-lisp | ||
129 | |||
130 | (use-package general | ||
131 | :config | ||
132 | (general-create-definer jd/leader-key-def | ||
133 | :keymaps '(normal insert visual emacs) | ||
134 | :prefix "SPC" | ||
135 | :global-prefix "C-SPC") | ||
136 | |||
137 | (general-create-definer jd/ctrl-c-keys | ||
138 | :prefix "C-c")) | ||
139 | |||
140 | #+end_src | ||
141 | |||
142 | ** Evil mode setup | ||
143 | |||
144 | #+begin_src emacs-lisp | ||
145 | |||
146 | (use-package undo-tree | ||
147 | :diminish | ||
148 | :config | ||
149 | (setq undo-tree-auto-save-history nil) | ||
150 | (global-undo-tree-mode 1)) | ||
151 | |||
152 | (use-package evil | ||
153 | :init | ||
154 | (setq evil-want-integration t) | ||
155 | (setq evil-want-keybinding nil) | ||
156 | (setq evil-want-C-u-scroll t) | ||
157 | (setq evil-want-Y-yank-to-eol t) | ||
158 | (setq evil-want-C-i-jump nil) | ||
159 | (setq evil-undo-system 'undo-tree) | ||
160 | (setq evil-kill-on-visual-paste nil) | ||
161 | :config | ||
162 | (evil-set-initial-state 'exwm-mode 'emacs) | ||
163 | (evil-mode 1)) | ||
164 | |||
165 | (use-package evil-collection | ||
166 | :after evil | ||
167 | :config | ||
168 | (evil-collection-init)) | ||
169 | |||
170 | #+end_src | ||
171 | |||
172 | *Keybinds* | ||
173 | |||
174 | #+begin_src emacs-lisp | ||
175 | |||
176 | (jd/leader-key-def | ||
177 | "w" 'evil-window-map | ||
178 | "wr" '(hydra-resize-window/body :which-key "Rezize window") | ||
179 | "wd" '(evil-window-delete :which-key "Window delete")) | ||
180 | |||
181 | (jd/leader-key-def | ||
182 | "ou" '(undo-tree-visualize :which-key "Open")) | ||
183 | |||
184 | ;; remove . key | ||
185 | (define-key evil-normal-state-map (kbd ".") '()) | ||
186 | #+end_src | ||
187 | |||
188 | * UI Configuration | ||
189 | ** Basic UI setup | ||
190 | #+begin_src emacs-lisp | ||
191 | |||
192 | (setq inhibit-startup-message t) | ||
193 | (setq visible-bell t) | ||
194 | (scroll-bar-mode -1) | ||
195 | (tool-bar-mode -1) | ||
196 | (tooltip-mode -1) | ||
197 | (menu-bar-mode -1) | ||
198 | (set-fringe-mode 10) | ||
199 | |||
200 | (set-face-attribute 'default nil :font "sourcecodepro" :height 100) | ||
201 | |||
202 | (add-hook 'prog-mode-hook 'menu-bar--display-line-numbers-mode-relative) | ||
203 | |||
204 | (global-set-key (kbd "<escape>") 'keyboard-escape-quit) | ||
205 | |||
206 | (global-prettify-symbols-mode 1) | ||
207 | |||
208 | (defalias 'yes-or-no-p 'y-or-n-p) | ||
209 | |||
210 | (use-package doom-themes | ||
211 | :config | ||
212 | (load-theme 'doom-ayu-dark t)) | ||
213 | |||
214 | (use-package diminish) | ||
215 | |||
216 | #+end_src | ||
217 | |||
218 | ** Hl todo | ||
219 | |||
220 | #+begin_src emacs-lisp | ||
221 | |||
222 | (use-package hl-todo | ||
223 | :init | ||
224 | (setq hl-todo-keyword-faces | ||
225 | '(("TODO" . "#FF0000") | ||
226 | ("FIXME" . "#FF0000") | ||
227 | ("DEBUG" . "#A020F0"))) | ||
228 | :config | ||
229 | (global-hl-todo-mode 1)) | ||
230 | |||
231 | #+end_src | ||
232 | |||
233 | ** Ivy and Counsel | ||
234 | |||
235 | #+begin_src emacs-lisp | ||
236 | |||
237 | (defun jd/switch-buffer () | ||
238 | (interactive) | ||
239 | (let ((completion-regexp-list '("\\`[^*]" | ||
240 | "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*"))) | ||
241 | (call-interactively 'counsel-switch-buffer))) | ||
242 | |||
243 | (defvar jd/load-theme-hook nil) | ||
244 | (defun jd/load-theme () | ||
245 | (interactive) | ||
246 | (counsel-load-theme) | ||
247 | (run-hooks 'jd/load-theme-hook)) | ||
248 | |||
249 | (use-package ivy | ||
250 | :diminish | ||
251 | :bind | ||
252 | (("C-s" . swiper) | ||
253 | :map ivy-minibuffer-map | ||
254 | ("C-k" . ivy-previous-line) | ||
255 | ("C-j" . ivy-next-line) | ||
256 | :map ivy-switch-buffer-map | ||
257 | ("C-k" . ivy-previous-line)) | ||
258 | :config | ||
259 | (ivy-mode 1)) | ||
260 | |||
261 | (use-package counsel | ||
262 | :config | ||
263 | (counsel-mode 1)) | ||
264 | |||
265 | #+end_src | ||
266 | |||
267 | *Keybinds* | ||
268 | |||
269 | #+begin_src emacs-lisp | ||
270 | |||
271 | (jd/leader-key-def | ||
272 | "t" '(:ignore t :which-key "Toggle") | ||
273 | "tT" '(toggle-truncate-lines :which-key "Toggle truncate lines") | ||
274 | "tt" '(jd/load-theme :which-key "Choose theme")) | ||
275 | |||
276 | (jd/leader-key-def | ||
277 | "bb" '(jd/switch-buffer :which-key "Buffer switch") | ||
278 | "ba" '(counsel-switch-buffer :which-key "Buffer switch") | ||
279 | "b" '(:ignore t :which-key "Buffer") | ||
280 | "," '(counsel-switch-buffer :which-key "Buffer switch")) | ||
281 | |||
282 | #+end_src | ||
283 | |||
284 | ** Which key | ||
285 | |||
286 | #+begin_src emacs-lisp | ||
287 | |||
288 | (use-package which-key | ||
289 | :diminish | ||
290 | :config | ||
291 | (which-key-mode) | ||
292 | (setq which-key-idle-delay 0.3)) | ||
293 | |||
294 | #+end_src | ||
295 | |||
296 | ** Modline | ||
297 | |||
298 | #+begin_src emacs-lisp | ||
299 | |||
300 | (use-package all-the-icons) | ||
301 | |||
302 | (use-package doom-modeline | ||
303 | :init (doom-modeline-mode 1) | ||
304 | :custom ((doom-modeline-height 15))) | ||
305 | |||
306 | #+end_src | ||
307 | |||
308 | ** Hydra | ||
309 | |||
310 | #+begin_src emacs-lisp | ||
311 | |||
312 | (use-package hydra | ||
313 | :defer t) | ||
314 | |||
315 | (defun jd/text-scale-increase () | ||
316 | (interactive) | ||
317 | (let ((old-face-attribute (face-attribute 'default :height))) | ||
318 | (set-face-attribute 'default nil :height (+ old-face-attribute 10)))) | ||
319 | |||
320 | (defun jd/text-scale-decrease () | ||
321 | (interactive) | ||
322 | (let ((old-face-attribute (face-attribute 'default :height))) | ||
323 | (set-face-attribute 'default nil :height (- old-face-attribute 10)))) | ||
324 | |||
325 | (defhydra hydra-resize-window (:timeout 4) | ||
326 | ("h" evil-window-decrease-width "<") | ||
327 | ("l" evil-window-increase-width ">") | ||
328 | ("k" evil-window-decrease-height "^") | ||
329 | ("j" evil-window-increase-height "v") | ||
330 | ("q" nil "finished" :exit t)) | ||
331 | |||
332 | (defhydra hydra-text-scale-global (:timeout 4) | ||
333 | "scale text" | ||
334 | ("j" jd/text-scale-increase "in") | ||
335 | ("k" jd/text-scale-decrease "out") | ||
336 | ("q" nil "finished" :exit t)) | ||
337 | |||
338 | (defhydra hydra-text-scale (:timeout 4) | ||
339 | "scale text" | ||
340 | ("j" text-scale-increase "in") | ||
341 | ("k" text-scale-decrease "out") | ||
342 | ("q" nil "finished" :exit t)) | ||
343 | |||
344 | (jd/leader-key-def | ||
345 | "tS" '(hydra-text-scale-global/body :which-key "Scale text") | ||
346 | "ts" '(hydra-text-scale/body :which-key "Scale text")) | ||
347 | |||
348 | #+end_src | ||
349 | |||
350 | ** Beacon | ||
351 | |||
352 | #+begin_src emacs-lisp | ||
353 | |||
354 | (use-package beacon | ||
355 | :config | ||
356 | (beacon-mode 1)) | ||
357 | |||
358 | #+end_src | ||
359 | |||
360 | ** Other Keybindings | ||
361 | *** Files | ||
362 | |||
363 | #+begin_src emacs-lisp | ||
364 | |||
365 | (jd/leader-key-def | ||
366 | "f" '(:ignore t :which-key "Files") | ||
367 | "fs" '(save-buffer :which-key "File save") | ||
368 | "." '(find-file :which-key "Find file") | ||
369 | "ff" '(find-file :which-key "Find file")) | ||
370 | |||
371 | #+end_src | ||
372 | |||
373 | *** Eval | ||
374 | |||
375 | #+begin_src emacs-lisp | ||
376 | |||
377 | (jd/leader-key-def | ||
378 | "e" '(:ignore t :which-key "Eval") | ||
379 | "eb" '(eval-buffer :which-key "Eval buffer") | ||
380 | "ee" '(eval-defun :which-key "Eval defun")) | ||
381 | |||
382 | (jd/leader-key-def | ||
383 | :keymaps '(visual) | ||
384 | "er" '(eval-region :which-key "Eval region")) | ||
385 | |||
386 | #+end_src | ||
387 | |||
388 | *** Buffers | ||
389 | |||
390 | #+begin_src emacs-lisp | ||
391 | |||
392 | (defun jd/kill-other-buffers () | ||
393 | (interactive) | ||
394 | (mapc 'kill-buffer (cdr (buffer-list (current-buffer))))) | ||
395 | |||
396 | (jd/leader-key-def | ||
397 | "bK" '(jd/kill-other-buffers :which-key "Kill other buffers") | ||
398 | "bk" '(kill-current-buffer :which-key "Kill buffer") | ||
399 | "bB" '(ibuffer :which-key "Open ibuffer")) | ||
400 | |||
401 | #+end_src | ||
402 | |||
403 | * Org | ||
404 | ** Org-mode setup | ||
405 | |||
406 | *Define variables* | ||
407 | |||
408 | #+begin_src emacs-lisp | ||
409 | (setq jd/org-home "~/Documents/Org") | ||
410 | (setq jd/org-roam-home (concat jd/org-home "/roam")) | ||
411 | (setq jd/org-roam-daily-home (concat jd/org-home "/roam/daily")) | ||
412 | #+end_src | ||
413 | |||
414 | #+begin_src emacs-lisp | ||
415 | |||
416 | (defun jd/org-mode-setup () | ||
417 | (org-indent-mode) | ||
418 | (variable-pitch-mode 1) | ||
419 | (visual-line-mode 1)) | ||
420 | |||
421 | (use-package org | ||
422 | :pin org | ||
423 | :commands (org-capture org-agenda) | ||
424 | :hook (org-mode . jd/org-mode-setup) | ||
425 | :config | ||
426 | (setq org-directory (file-truename "~/Documents/Org/")) | ||
427 | (setq org-mobile-inbox-for-pull (concat org-directory "flagged.org")) | ||
428 | (setq org-mobile-directory "~/Dropbox/Apps/MobileOrg") | ||
429 | (setq org-agenda-files | ||
430 | '("Tasks.org")) | ||
431 | (setq org-ellipsis " ▾") | ||
432 | (setq org-agenda-start-with-log-mode t) | ||
433 | (setq org-log-done 'time) | ||
434 | (setq org-log-into-drawer t) | ||
435 | (setq org-return-follows-link t) | ||
436 | (setq org-capture-templates | ||
437 | `(("t" "Tasks / Projects") | ||
438 | ("tt" "Task" entry (file+olp "Tasks.org" "Inbox") | ||
439 | "* TODO %?\n %t\n %a\n %i" :empty-lines 1) | ||
440 | ("tT" "Task for tomorow" entry (file+olp "Tasks.org" "Inbox") | ||
441 | "* TODO %?\n %t\n SCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+1d\"))\n %a\n %i" :empty-lines 1) | ||
442 | |||
443 | ("m" "Metrics Capture") | ||
444 | ("mm" "Metrics" table-line (file+headline "Metrics.org" "Metrics") | ||
445 | "| %U | %^{Weight} | %^{Waist} | %^{Notes} |" :kill-buffer t))) | ||
446 | |||
447 | (setq org-latex-listings 'minted | ||
448 | org-latex-packages-alist '(("" "minted")) | ||
449 | org-latex-pdf-process | ||
450 | '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" | ||
451 | "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")) | ||
452 | |||
453 | (require 'org-tempo)) | ||
454 | |||
455 | #+end_src | ||
456 | |||
457 | *Keybinds* | ||
458 | |||
459 | #+begin_src emacs-lisp | ||
460 | |||
461 | (jd/leader-key-def | ||
462 | "o" '(:ignore t :which-key "Open/Org") | ||
463 | "oc" '(org-capture :which-key "Open org-capture") | ||
464 | "oop" '(org-mobile-pull :which-key "Org mobile pull") | ||
465 | "ooP" '(org-mobile-push :which-key "Org mobile push") | ||
466 | "oa" '(org-agenda :which-key "Open org-agenda")) | ||
467 | |||
468 | #+end_src | ||
469 | |||
470 | ** Org evil | ||
471 | |||
472 | #+begin_src emacs-lisp | ||
473 | |||
474 | (use-package evil-org | ||
475 | :after org | ||
476 | :hook (org-mode . (lambda () evil-org-mode)) | ||
477 | :config | ||
478 | (require 'evil-org-agenda) | ||
479 | (evil-org-agenda-set-keys)) | ||
480 | |||
481 | #+end_src | ||
482 | |||
483 | ** Org make toc | ||
484 | |||
485 | #+begin_src emacs-lisp | ||
486 | |||
487 | (use-package toc-org | ||
488 | :config | ||
489 | (add-hook 'org-mode-hook 'toc-org-mode)) | ||
490 | |||
491 | #+end_src | ||
492 | |||
493 | ** Org fonts | ||
494 | |||
495 | #+begin_src emacs-lisp | ||
496 | |||
497 | (defun jd/org-font-setup () | ||
498 | ;; Replace list hyphen with dot | ||
499 | (font-lock-add-keywords 'org-mode | ||
500 | '(("^ *\\([-]\\) " | ||
501 | (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•-")))))) | ||
502 | |||
503 | ;; Set faces for heading levels | ||
504 | (dolist (face '((org-level-1 . 1.3) | ||
505 | (org-level-2 . 1.2) | ||
506 | (org-level-3 . 1.1) | ||
507 | (org-level-4 . 1.0) | ||
508 | (org-level-5 . 1.1) | ||
509 | (org-level-6 . 1.1) | ||
510 | (org-level-7 . 1.1) | ||
511 | (org-level-8 . 1.1))) | ||
512 | (set-face-attribute (car face) nil :font "sans" :weight 'Bold :height (cdr face))) | ||
513 | |||
514 | ;; Ensure that anything that should be fixed-pitch in Org files appears that way | ||
515 | (set-face-attribute 'org-block nil :font "hack" :inherit 'fixed-pitch) | ||
516 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) | ||
517 | (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) | ||
518 | (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) | ||
519 | (set-face-attribute 'org-table nil :font "hack ":inherit '(shadow fixed-pitch)) | ||
520 | (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) | ||
521 | (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) | ||
522 | (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) | ||
523 | (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) | ||
524 | (set-face-attribute 'line-number nil :inherit 'fixed-pitch) | ||
525 | (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) | ||
526 | |||
527 | (with-eval-after-load 'org-faces (jd/org-font-setup)) | ||
528 | |||
529 | #+end_src | ||
530 | |||
531 | ** Org tempo setup | ||
532 | |||
533 | #+begin_src emacs-lisp | ||
534 | |||
535 | (defun jd/org-tempo-setup () | ||
536 | (add-to-list 'org-structure-template-alist '("s" . "src")) | ||
537 | (add-to-list 'org-structure-template-alist '("sql" . "src sql")) | ||
538 | (add-to-list 'org-structure-template-alist '("sh" . "src sh")) | ||
539 | (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) | ||
540 | (add-to-list 'org-structure-template-alist '("li" . "src lisp")) | ||
541 | (add-to-list 'org-structure-template-alist '("sc" . "src scheme")) | ||
542 | (add-to-list 'org-structure-template-alist '("ts" . "src typescript")) | ||
543 | (add-to-list 'org-structure-template-alist '("py" . "src python")) | ||
544 | (add-to-list 'org-structure-template-alist '("go" . "src go")) | ||
545 | (add-to-list 'org-structure-template-alist '("yaml" . "src yaml"))) | ||
546 | |||
547 | (with-eval-after-load 'org-tempo (jd/org-tempo-setup)) | ||
548 | |||
549 | #+end_src | ||
550 | |||
551 | ** Org babel setup | ||
552 | |||
553 | *** Load languages | ||
554 | |||
555 | #+begin_src emacs-lisp | ||
556 | |||
557 | (org-babel-do-load-languages | ||
558 | 'org-babel-load-languages | ||
559 | '((emacs-lisp . t) | ||
560 | (python . t))) | ||
561 | |||
562 | #+end_src | ||
563 | |||
564 | *** Auto tangle | ||
565 | |||
566 | #+begin_src emacs-lisp | ||
567 | |||
568 | (defun jd/org-babel-tangle-config () | ||
569 | (when (string-equal (file-name-directory (buffer-file-name)) | ||
570 | (expand-file-name "~/dotfiles/")) | ||
571 | ;; Dynamic scoping to the rescue | ||
572 | (let ((org-confirm-babel-evaluate nil)) | ||
573 | (org-babel-tangle)))) | ||
574 | |||
575 | (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'jd/org-babel-tangle-config))) | ||
576 | |||
577 | #+end_src | ||
578 | |||
579 | ** Org margin | ||
580 | |||
581 | #+begin_src emacs-lisp | ||
582 | |||
583 | (defun jd/org-mode-visual-fill () | ||
584 | (setq visual-fill-column-width 100 | ||
585 | visual-fill-column-center-text t) | ||
586 | (visual-fill-column-mode 1)) | ||
587 | |||
588 | (use-package visual-fill-column | ||
589 | :hook (org-mode . jd/org-mode-visual-fill)) | ||
590 | |||
591 | #+end_src | ||
592 | |||
593 | ** Org superstar | ||
594 | |||
595 | #+begin_src emacs-lisp | ||
596 | |||
597 | (use-package org-superstar | ||
598 | :hook (org-mode . org-superstar-mode) | ||
599 | :init | ||
600 | (setq org-superstar-special-todo-items t) | ||
601 | (setq org-superstar-remove-leading-stars t) | ||
602 | (setq org-superstar-headline-bullets-list '("◉" "○" "●" "○" "●" "○" "●"))) | ||
603 | |||
604 | #+end_src | ||
605 | |||
606 | ** Org roam | ||
607 | |||
608 | #+begin_src emacs-lisp | ||
609 | |||
610 | (defun jd/org-roam-filter-by-tag (tag-name) | ||
611 | (lambda (node) | ||
612 | (member tag-name (org-roam-node-tags node)))) | ||
613 | |||
614 | (defun jd/org-roam-list-notes-by-tag (tag-name) | ||
615 | (mapcar #'org-roam-node-file | ||
616 | (seq-filter | ||
617 | (jd/org-roam-filter-by-tag tag-name) | ||
618 | (org-roam-node-list)))) | ||
619 | |||
620 | (defun jd/org-roam-refreshagenda-list () | ||
621 | (interactive) | ||
622 | (setq org-agenda-files (org-roam-list-files))) | ||
623 | |||
624 | (use-package org-roam | ||
625 | :custom | ||
626 | (org-roam-directory (file-truename jd/org-roam-home)) | ||
627 | :bind (("C-c n l" . org-roam-buffer-toggle) | ||
628 | ("C-c n f" . org-roam-node-find) | ||
629 | ("C-c n g" . org-roam-graph) | ||
630 | ("C-c n i" . org-roam-node-insert) | ||
631 | ("C-c n c" . org-roam-capture) | ||
632 | ;; Dailies | ||
633 | ("C-c n j" . org-roam-dailies-capture-today)) | ||
634 | :bind-keymap | ||
635 | ("C-c n d" . org-roam-dailies-map) | ||
636 | :config | ||
637 | ;; If you're using a vertical completion framework, you might want a more informative completion interface | ||
638 | (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) | ||
639 | (setq org-roam-capture-templates | ||
640 | '(("a" "workstuff" plain (file (concat org-roam-directory "/work")) | ||
641 | :target (file+head "work/%<%Y%m%d%H%M%S>-${slug}.org" | ||
642 | "#+title: ${title}\n") :unnarrowed t) | ||
643 | ("b" "research" plain (file "~/Documents/roam/study/templates/research.org") | ||
644 | :target (file+head "study/%<%Y%m%d%H%M%S>-${slug}.org" | ||
645 | "#+title: ${title}\n") :unnarrowed t) | ||
646 | )) | ||
647 | |||
648 | (org-roam-db-autosync-mode)) | ||
649 | |||
650 | #+end_src | ||
651 | |||
652 | ** langtool.el | ||
653 | |||
654 | #+begin_src emacs-lisp | ||
655 | |||
656 | (use-package langtool | ||
657 | :config | ||
658 | (setq langtool-language-tool-jar "/home/jakub/Documents/LanguageTool-6.0/languagetool-commandline.jar") | ||
659 | (setq langtool-default-language "pl-PL")) | ||
660 | |||
661 | (jd/leader-key-def | ||
662 | "l" '(:ignore t :which-key "langtool") | ||
663 | "lc" 'langtool-check-buffer | ||
664 | "ld" 'langtool-check-done | ||
665 | "li" 'langtool-interactive-correction) | ||
666 | |||
667 | |||
668 | #+end_src | ||
669 | |||
670 | * Development | ||
671 | ** Languages | ||
672 | |||
673 | *** C | ||
674 | |||
675 | #+begin_src emacs-lisp | ||
676 | |||
677 | (setq c-default-style "linux" | ||
678 | c-basic-offset 8) | ||
679 | |||
680 | (setq gdb-many-windows t) | ||
681 | |||
682 | #+end_src | ||
683 | |||
684 | *** Lsp | ||
685 | |||
686 | #+begin_src emacs-lisp | ||
687 | |||
688 | (use-package lsp-mode | ||
689 | :commands (lsp lsp-deferred) | ||
690 | :init | ||
691 | (setq lsp-headerline-breadcrumb-enable nil) | ||
692 | (setq lsp-diagnostics-provider :none) | ||
693 | (setq lsp-modeline-diagnostics-enable nil) | ||
694 | (setq lsp-keymap-prefix "C-c l") | ||
695 | :config | ||
696 | (lsp-enable-which-key-integration t)) | ||
697 | |||
698 | (use-package lsp-ivy | ||
699 | :after lsp) | ||
700 | |||
701 | #+end_src | ||
702 | |||
703 | *** Lisp | ||
704 | |||
705 | #+begin_src emacs-lisp | ||
706 | |||
707 | (use-package paredit) | ||
708 | (use-package evil-paredit) | ||
709 | (use-package rainbow-delimiters) | ||
710 | |||
711 | (defun jd/lisp-mode-setup () | ||
712 | (rainbow-delimiters-mode) | ||
713 | (evil-paredit-mode) | ||
714 | (paredit-mode)) | ||
715 | |||
716 | (add-hook 'emacs-startup-hook | ||
717 | (lambda () | ||
718 | (add-hook 'scheme-mode-hook 'jd/lisp-mode-setup) | ||
719 | (add-hook 'emacs-lisp-mode-hook 'jd/lisp-mode-setup) | ||
720 | (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) | ||
721 | |||
722 | (evil-define-key 'normal paredit-mode-map (kbd "g h") 'paredit-forward-barf-sexp) | ||
723 | (evil-define-key 'normal paredit-mode-map (kbd "g l") 'paredit-forward-slurp-sexp) | ||
724 | |||
725 | (evil-define-key 'normal paredit-mode-map (kbd "g H") 'paredit-backward-slurp-sexp) | ||
726 | (evil-define-key 'normal paredit-mode-map (kbd "g L") 'paredit-backward-barf-sexp) | ||
727 | |||
728 | (use-package geiser) | ||
729 | (use-package geiser-guile) | ||
730 | |||
731 | #+end_src | ||
732 | |||
733 | *** Python | ||
734 | |||
735 | #+begin_src emacs-lisp | ||
736 | |||
737 | (defun jd/python-mode-setup () | ||
738 | (let ((project-venv-path (concat (projectile-project-root) "venv/"))) | ||
739 | (when (projectile--directory-p project-venv-path) | ||
740 | (pyvenv-activate project-venv-path) | ||
741 | (pyvenv-mode)))) | ||
742 | |||
743 | ;; (use-package python-mode ;;TODO: find alternative | ||
744 | ;; :hook (python-mode . lsp-deferred) | ||
745 | ;; :hook (python-mode . jd/python-mode-setup) | ||
746 | ;; :config | ||
747 | ;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) | ||
748 | |||
749 | (use-package pyvenv | ||
750 | :after python-mode) | ||
751 | |||
752 | #+end_src | ||
753 | |||
754 | *** TypeScript | ||
755 | |||
756 | #+begin_src emacs-lisp | ||
757 | |||
758 | (use-package typescript-mode | ||
759 | :mode ("\\.ts\\'") | ||
760 | :config | ||
761 | (setq typescript-indent-level 2)) | ||
762 | |||
763 | (defun jd/activate-tide-mode () | ||
764 | (when (and (stringp buffer-file-name) | ||
765 | (string-match "\\.[tj]sx?\\'" buffer-file-name)) | ||
766 | (tide-setup) | ||
767 | (tide-hl-identifier-mode))) | ||
768 | |||
769 | (use-package tide | ||
770 | :after (typescript-mode company web-mode)) | ||
771 | |||
772 | (use-package flycheck | ||
773 | :hook ((after-init . global-flycheck-mode))) | ||
774 | |||
775 | (use-package web-mode | ||
776 | :hook ((web-mode . jd/activate-tide-mode)) | ||
777 | :mode | ||
778 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") | ||
779 | :config | ||
780 | (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'"))) | ||
781 | (setq web-mode-markup-indent-offset 2) | ||
782 | (setq web-mode-css-indent-offset 2) | ||
783 | (setq web-mode-code-indent-offset 2) | ||
784 | (setq web-mode-script-padding 2) | ||
785 | (setq web-mode-block-padding 2) | ||
786 | (setq web-mode-style-padding 2) | ||
787 | (setq web-mode-enable-auto-pairing t) | ||
788 | (setq web-mode-enable-auto-closing t) | ||
789 | (setq web-mode-enable-current-element-highlight t)) | ||
790 | |||
791 | #+end_src | ||
792 | |||
793 | *** Yaml | ||
794 | |||
795 | #+begin_src emacs-lisp | ||
796 | |||
797 | (use-package yaml-mode) | ||
798 | |||
799 | #+end_src | ||
800 | |||
801 | *** Docker | ||
802 | |||
803 | #+begin_src emacs-lisp | ||
804 | |||
805 | (use-package docker) | ||
806 | |||
807 | #+end_src | ||
808 | |||
809 | *Keybinds* | ||
810 | |||
811 | #+begin_src emacs-lisp | ||
812 | |||
813 | (jd/leader-key-def | ||
814 | "d" '(:ignore t :which-key "Docker") | ||
815 | "dc" '(docker-containers :which-key "Docker containers") | ||
816 | "dd" '(docker :which-key "Docker")) | ||
817 | |||
818 | #+end_src | ||
819 | |||
820 | ** Company | ||
821 | |||
822 | #+begin_src emacs-lisp | ||
823 | |||
824 | (use-package company | ||
825 | :after lsp-mode | ||
826 | :hook (lsp-mode . company-mode) | ||
827 | :bind (:map company-active-map | ||
828 | ("<tab>" . company-complete-selection)) | ||
829 | (:map lsp-mode-map | ||
830 | ("<tab>" . company-indent-or-complete-common)) | ||
831 | :custom | ||
832 | (company-minimum-prefix-length 1) | ||
833 | (company-idle-delay 0.0) | ||
834 | :config | ||
835 | (global-company-mode)) | ||
836 | |||
837 | (use-package company-box | ||
838 | :hook (company-mode . company-box-mode)) | ||
839 | |||
840 | #+end_src | ||
841 | |||
842 | ** Projectile | ||
843 | |||
844 | #+begin_src emacs-lisp | ||
845 | |||
846 | (use-package projectile | ||
847 | :diminish projectile-mode | ||
848 | :init | ||
849 | (when (file-directory-p "~/Documents/code") | ||
850 | (setq projectile-project-search-path '("~/Documents/code/"))) | ||
851 | :custom ((projectile-Completion-system 'ivy)) | ||
852 | :config | ||
853 | (setq projectile-switch-project-action #'projectile-dired) | ||
854 | (projectile-mode)) | ||
855 | |||
856 | #+end_src | ||
857 | |||
858 | *Keybinds* | ||
859 | |||
860 | #+begin_src emacs-lisp | ||
861 | |||
862 | (jd/leader-key-def | ||
863 | "p" '(projectile-command-map :which-key "Project") | ||
864 | "p <ESC>" '() | ||
865 | "SPC" '(projectile-find-file :which-key "Find file in project")) | ||
866 | |||
867 | #+end_src | ||
868 | |||
869 | ** Neotree | ||
870 | |||
871 | #+begin_src emacs-lisp | ||
872 | |||
873 | (defun jd/neotree-project-dir () | ||
874 | "Open NeoTree using the git root." | ||
875 | (interactive) | ||
876 | (let ((project-dir (projectile-project-root)) | ||
877 | (file-name (buffer-file-name))) | ||
878 | (neotree-toggle) | ||
879 | (if project-dir | ||
880 | (if (neo-global--window-exists-p) | ||
881 | (progn | ||
882 | (neotree-dir project-dir) | ||
883 | (neotree-find file-name))) | ||
884 | (message "Could not find git project root.")))) | ||
885 | |||
886 | (use-package neotree | ||
887 | :init | ||
888 | (setq neo-theme 'icons) | ||
889 | :config | ||
890 | |||
891 | (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) | ||
892 | (evil-define-key 'normal neotree-mode-map (kbd "C-RET") 'neotree-quick-look) | ||
893 | (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) | ||
894 | (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) | ||
895 | (evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh) | ||
896 | (evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle) | ||
897 | (evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle)) | ||
898 | |||
899 | #+end_src | ||
900 | |||
901 | *Keybinds* | ||
902 | |||
903 | #+begin_src emacs-lisp | ||
904 | |||
905 | (jd/leader-key-def | ||
906 | "op" '(jd/neotree-project-dir :which-key "Open neotree")) | ||
907 | |||
908 | #+end_src | ||
909 | |||
910 | ** Magit | ||
911 | |||
912 | #+begin_src emacs-lisp | ||
913 | |||
914 | (use-package magit | ||
915 | :custom | ||
916 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) | ||
917 | |||
918 | #+end_src | ||
919 | |||
920 | *Keybinds* | ||
921 | |||
922 | #+begin_src emacs-lisp | ||
923 | |||
924 | (jd/leader-key-def | ||
925 | "g" '(:ignore t :which-key "Git") | ||
926 | "gg" '(magit-status-here :which-key "Magit status")) | ||
927 | |||
928 | #+end_src | ||
929 | |||
930 | * Apps | ||
931 | ** Vterm | ||
932 | |||
933 | #+begin_src emacs-lisp | ||
934 | |||
935 | (defun jd/open-new-vterm (&optional jd/vterm-buffer-name) | ||
936 | (interactive) | ||
937 | (let ((buffer-name (generate-new-buffer-name vterm-buffer-name))) | ||
938 | (when jd/vterm-buffer-name | ||
939 | (setq buffer-name jd/vterm-buffer-name)) | ||
940 | (switch-to-buffer buffer-name) | ||
941 | (vterm-mode))) | ||
942 | |||
943 | |||
944 | (use-package vterm | ||
945 | :init | ||
946 | (add-to-list 'project-switch-commands '(project-vterm "Vterm") t) | ||
947 | (add-to-list 'project-kill-buffer-conditions '(major-mode . vterm-mode)) | ||
948 | (setq vterm-copy-exclude-prompt t) | ||
949 | :config | ||
950 | (setq vterm-buffer-name "vterm") | ||
951 | (evil-set-initial-state 'vterm-mode 'emacs) | ||
952 | (setq vterm-tramp-shells (append '(("ssh" "/bin/bash")) vterm-tramp-shells))) | ||
953 | |||
954 | #+end_src | ||
955 | |||
956 | *Keybinds* | ||
957 | |||
958 | #+begin_src emacs-lisp | ||
959 | |||
960 | (jd/leader-key-def | ||
961 | "ot" '(jd/open-new-vterm :which-key "Open terminal in current window")) | ||
962 | |||
963 | #+end_src | ||
964 | |||
965 | ** Dired | ||
966 | |||
967 | #+begin_src emacs-lisp | ||
968 | |||
969 | (use-package all-the-icons-dired | ||
970 | :hook (dired-mode . all-the-icons-dired-mode)) | ||
971 | |||
972 | (use-package dired-ranger) | ||
973 | |||
974 | (use-package dired | ||
975 | :ensure nil | ||
976 | :commands (dired dired-jump) | ||
977 | :custom ((dired-listing-switches "-agho --group-directories-first")) | ||
978 | :config | ||
979 | (evil-collection-define-key 'normal 'dired-mode-map | ||
980 | "y" 'dired-ranger-copy | ||
981 | "p" 'dired-ranger-paste | ||
982 | "X" 'dired-ranger-move | ||
983 | "h" 'dired-up-directory | ||
984 | "t" 'dired-create-empty-file | ||
985 | "T" 'dired-toggle-marks | ||
986 | "l" 'dired-find-file) | ||
987 | (setq dired-kill-when-opening-new-dired-buffer t) | ||
988 | (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer)) | ||
989 | |||
990 | |||
991 | #+end_src | ||
992 | |||
993 | ** EMMS | ||
994 | |||
995 | #+begin_src emacs-lisp | ||
996 | |||
997 | (use-package emms | ||
998 | :config | ||
999 | (require 'emms-setup) | ||
1000 | (emms-all) | ||
1001 | (emms-standard) | ||
1002 | (emms-default-players) | ||
1003 | (emms-mode-line-disable) | ||
1004 | ; (setq emms-info-functions '(emms-info-tinytag)) | ||
1005 | (setq emms-browser-covers 'emms-browser-cache-thumbnail-async) | ||
1006 | ;; (setq emms-lyrics-dir "~/Documents/music/lyrics") | ||
1007 | (emms-add-directory-tree "~/Documents/Music/")) | ||
1008 | |||
1009 | #+end_src | ||
1010 | |||
1011 | ** PDF Tools | ||
1012 | |||
1013 | #+begin_src emacs-lisp | ||
1014 | |||
1015 | (use-package pdf-tools) | ||
1016 | |||
1017 | #+end_src | ||
1018 | |||
1019 | ** Mu4e | ||
1020 | - Load my [[./Mail.org][mu4e]] config | ||
1021 | |||
1022 | #+begin_src emacs-lisp | ||
1023 | (require 'jd-mu4e) | ||
1024 | #+end_src | ||
1025 | |||
1026 | ** RSS | ||
1027 | |||
1028 | #+begin_src emacs-lisp | ||
1029 | |||
1030 | (use-package elfeed | ||
1031 | :config | ||
1032 | (setq elfeed-feeds | ||
1033 | '(("https://www.reddit.com/r/emacs.rss" emacs) | ||
1034 | ("https://www.reddit.com/r/gnu.rss" gnu) | ||
1035 | ("https://stallman.org/rss/rss.xml" stallman)))) | ||
1036 | |||
1037 | #+end_src | ||
1038 | |||
1039 | * Custom | ||
1040 | |||
1041 | #+begin_src emacs-lisp | ||
1042 | (defun jd/generete-qr-from-clipboard () | ||
1043 | (interactive) | ||
1044 | (let ((clipboard-value (x-get-clipboard)) | ||
1045 | (clipboard-file-path "/tmp/clipboard_value.txt") | ||
1046 | (clipboard-out-image "/tmp/qr.png")) | ||
1047 | (with-temp-file clipboard-file-path | ||
1048 | (insert clipboard-value)) | ||
1049 | (shell-command (concat | ||
1050 | "qrencode -o " | ||
1051 | clipboard-out-image | ||
1052 | " < " | ||
1053 | clipboard-file-path)) | ||
1054 | (find-file clipboard-out-image))) | ||
1055 | |||
1056 | |||
1057 | ;; (defun jd/screenshot () | ||
1058 | ;; (inactive) | ||
1059 | ;; (let* ((screenshot-command '("import" "png:-")) | ||
1060 | ;; (image | ||
1061 | ;; (with-temp-buffer | ||
1062 | ;; (set-buffer-multibyte nil) | ||
1063 | ;; (apply #'call-process | ||
1064 | ;; (car screenshot-command) nil (current-buffer) nil | ||
1065 | ;; (cdr screenshot-command)) | ||
1066 | ;; (buffer-string)))) | ||
1067 | ;; (set-mark (point)) | ||
1068 | ;; (insert-image | ||
1069 | ;; (create-image image 'png t | ||
1070 | ;; :max-width (truncate (* (frame-pixel-width) 0.8)) | ||
1071 | ;; :max-height (truncate (* (frame-pixel-height) 0.8)) | ||
1072 | ;; :scale 1) | ||
1073 | ;; (format "<#part type=\"image/png\" disposition=inline data-encoding=base64 raw=t>\n%s\n<#/part>" | ||
1074 | ;; ;; Get a base64 version of the image -- this avoids later | ||
1075 | ;; ;; complications if we're auto-saving the buffer and | ||
1076 | ;; ;; restoring from a file. | ||
1077 | ;; (with-temp-buffer | ||
1078 | ;; (set-buffer-multibyte nil) | ||
1079 | ;; (insert image) | ||
1080 | ;; (base64-encode-region (point-min) (point-max) t) | ||
1081 | ;; (buffer-string)))) | ||
1082 | ;; (insert "\n\n") | ||
1083 | ;; (message ""))) | ||
1084 | |||
1085 | #+end_src | ||
1086 | |||
1087 | * Runtime Performance | ||
1088 | |||
1089 | #+begin_src emacs-lisp | ||
1090 | (setq gc-cons-threshold (* 2 1000 1000)) | ||
1091 | #+end_src | ||
diff --git a/Mail.org b/Mail.org deleted file mode 100644 index 1ded00d..0000000 --- a/Mail.org +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | #+TITLE: MU4E Configuration | ||
2 | #+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/jd/jd-mu4e.el | ||
3 | |||
4 | * jd-mu4e.el | ||
5 | #+begin_src emacs-lisp | ||
6 | (add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e") | ||
7 | |||
8 | (use-package org-msg) | ||
9 | |||
10 | (use-package mu4e | ||
11 | :defer 20 | ||
12 | :ensure nil | ||
13 | :config | ||
14 | (require 'org-mu4e) | ||
15 | |||
16 | (setq mu4e-update-interval (* 10 60)) | ||
17 | (setq mu4e-get-mail-command "mbsync -a") | ||
18 | (setq mu4e-maildir "~/Mail") | ||
19 | |||
20 | (setq mu4e-completing-read-function #'ivy-completing-read) | ||
21 | |||
22 | (setq mu4e-change-filenames-when-moving t) | ||
23 | |||
24 | (setq mu4e-contexts | ||
25 | `(,(make-mu4e-context | ||
26 | :name "Abaks" | ||
27 | :match-func (lambda (msg) (when msg | ||
28 | (string-prefix-p "/abaks" (mu4e-message-field msg :maildir)))) | ||
29 | :vars '( | ||
30 | (user-full-name . "Jakub Dlugosz") | ||
31 | (user-mail-address . "jakub@abaks.pl") | ||
32 | (mu4e-sent-folder . "/abaks/Sent Items") | ||
33 | (mu4e-trash-folder . "/abaks/Trash") | ||
34 | (mu4e-drafts-folder . "/abaks/Drafts") | ||
35 | (mu4e-refile-folder . "/abaks/Archive") | ||
36 | (smtpmail-local-domain . "pl") | ||
37 | (smtpmail-smtp-server . "smtp.abaks.pl") | ||
38 | (mu4e-sent-messages-behavior . sent) | ||
39 | )) | ||
40 | ,(make-mu4e-context | ||
41 | :name "Gmail" | ||
42 | :match-func (lambda (msg) (when msg | ||
43 | (string-prefix-p "/gmail" (mu4e-message-field msg :maildir)))) | ||
44 | :vars '( | ||
45 | (user-full-name . "Jakub Dlugosz") | ||
46 | (user-mail-address . "jdlugosz963@gmail.com") | ||
47 | (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane") | ||
48 | (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz") | ||
49 | (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze") | ||
50 | (mu4e-refile-folder . "/gmail/Archive") | ||
51 | (smtpmail-local-domain . "com") | ||
52 | (smtpmail-smtp-server . "smtp.gmail.com") | ||
53 | (mu4e-sent-messages-behavior . sent) | ||
54 | )))) | ||
55 | |||
56 | (setq mail-user-agent 'mu4e-user-agent | ||
57 | mail-host-address nil | ||
58 | message-send-mail-function 'smtpmail-send-it | ||
59 | smtpmail-smtp-service 465 | ||
60 | smtpmail-stream-type 'ssl) | ||
61 | |||
62 | (setq mu4e-compose-signature (concat | ||
63 | "Pozdrawiam,\n" | ||
64 | "Jakub Długosz")) | ||
65 | |||
66 | (mu4e t)) | ||
67 | |||
68 | #+end_src | ||
69 | |||
70 | *mu4e-alert* | ||
71 | |||
72 | #+begin_src emacs-lisp | ||
73 | (use-package mu4e-alert | ||
74 | :defer 20 | ||
75 | :config | ||
76 | (mu4e-alert-set-default-style 'libnotify) | ||
77 | (mu4e-alert-enable-mode-line-display) | ||
78 | (mu4e-alert-enable-notifications)) | ||
79 | #+end_src | ||
80 | |||
81 | *mu4e bindings* | ||
82 | |||
83 | #+begin_src emacs-lisp | ||
84 | (jd/leader-key-def | ||
85 | "m" '(:ignore t :which-key "mail") | ||
86 | "mm" 'mu4e | ||
87 | "mc" 'mu4e-compose-new) | ||
88 | |||
89 | (provide 'jd-mu4e) | ||
90 | #+end_src | ||
91 | |||
92 | * mbsyncrc | ||
93 | |||
94 | #+begin_src conf :tangle .mbsyncrc | ||
95 | IMAPStore abaks-remote | ||
96 | Host imap.abaks.pl | ||
97 | Port 143 | ||
98 | SSLType None | ||
99 | AuthMechs LOGIN | ||
100 | User jakub@abaks.pl | ||
101 | PassCmd "pass email/jakub@abaks.pl" | ||
102 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
103 | |||
104 | MaildirStore abaks-local | ||
105 | Path ~/Mail/abaks/ | ||
106 | Inbox ~/Mail/abaks/INBOX | ||
107 | Subfolders Verbatim | ||
108 | |||
109 | Channel abaks | ||
110 | Far :abaks-remote: | ||
111 | Near :abaks-local: | ||
112 | Patterns INBOX * !Sync* | ||
113 | Expunge None | ||
114 | CopyArrivalDate yes | ||
115 | Sync All | ||
116 | Create Near | ||
117 | SyncState * | ||
118 | |||
119 | IMAPStore gmail-remote | ||
120 | Host imap.gmail.com | ||
121 | Port 993 | ||
122 | SSLType IMAPS | ||
123 | AuthMechs LOGIN | ||
124 | User jdlugosz963@gmail.com | ||
125 | PassCmd "pass email/jdlugosz963@gmail.com" | ||
126 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
127 | |||
128 | MaildirStore gmail-local | ||
129 | Path ~/Mail/gmail/ | ||
130 | Inbox ~/Mail/gmail/INBOX | ||
131 | Subfolders Verbatim | ||
132 | |||
133 | Channel gmail | ||
134 | Far :gmail-remote: | ||
135 | Near :gmail-local: | ||
136 | Patterns INBOX * !Sync* | ||
137 | Expunge None | ||
138 | CopyArrivalDate yes | ||
139 | Sync All | ||
140 | Create Near | ||
141 | SyncState * | ||
142 | #+end_src | ||