summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-12-31 23:13:21 +0100
committerjdlugosz963 <jdlugosz963@gmail.com>2022-12-31 23:13:21 +0100
commit991712cc6a862e6166392ab8400cd67ee732f11d (patch)
treefcbca16dbbecb4edede6a0281d5f4411ee153e0f
parent0f4bbda32a224255f65a544ceb42ffea73913739 (diff)
downloaddotfiles-991712cc6a862e6166392ab8400cd67ee732f11d.tar.gz
dotfiles-991712cc6a862e6166392ab8400cd67ee732f11d.zip
Update emacs config
-rw-r--r--.config/emacs/init.el29
-rw-r--r--Emacs.org21
2 files changed, 38 insertions, 12 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index c77dbe8..780a1c6 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -98,7 +98,7 @@
98(menu-bar-mode -1) 98(menu-bar-mode -1)
99(set-fringe-mode 10) 99(set-fringe-mode 10)
100 100
101(set-face-attribute 'default nil :font "Hack" :height 100) 101(set-face-attribute 'default nil :font "sourcecodepro" :height 100)
102 102
103(add-hook 'prog-mode-hook 'menu-bar--display-line-numbers-mode-relative) 103(add-hook 'prog-mode-hook 'menu-bar--display-line-numbers-mode-relative)
104 104
@@ -108,7 +108,7 @@
108 108
109(use-package doom-themes 109(use-package doom-themes
110 :config 110 :config
111 (load-theme 'doom-badger t)) 111 (load-theme 'doom-ayu-dark t))
112 112
113(use-package diminish) 113(use-package diminish)
114 114
@@ -127,6 +127,12 @@
127 "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*"))) 127 "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*")))
128 (call-interactively 'counsel-switch-buffer))) 128 (call-interactively 'counsel-switch-buffer)))
129 129
130(defvar jd/load-theme-hook nil)
131(defun jd/load-theme ()
132 (interactive)
133 (counsel-load-theme)
134 (run-hooks 'jd/load-theme-hook))
135
130(use-package ivy 136(use-package ivy
131 :diminish 137 :diminish
132 :bind 138 :bind
@@ -144,8 +150,9 @@
144 (counsel-mode 1)) 150 (counsel-mode 1))
145 151
146(jd/leader-key-def 152(jd/leader-key-def
147 "t" '(:ignore t :which-key "Toogle") 153 "t" '(:ignore t :which-key "Toggle")
148 "tt" '(counsel-load-theme :which-key "Choose theme")) 154 "tT" '(toggle-truncate-lines :which-key "Toggle truncate lines")
155 "tt" '(jd/load-theme :which-key "Choose theme"))
149 156
150(jd/leader-key-def 157(jd/leader-key-def
151 "bb" '(jd/switch-buffer :which-key "Buffer switch") 158 "bb" '(jd/switch-buffer :which-key "Buffer switch")
@@ -228,6 +235,10 @@
228 "bk" '(kill-current-buffer :which-key "Kill buffer") 235 "bk" '(kill-current-buffer :which-key "Kill buffer")
229 "bB" '(ibuffer :which-key "Open ibuffer")) 236 "bB" '(ibuffer :which-key "Open ibuffer"))
230 237
238(setq jd/org-home "~/Documents/Org")
239(setq jd/org-roam-home (concat jd/org-home "/roam"))
240(setq jd/org-roam-daily-home (concat jd/org-home "/roam/daily"))
241
231(defun jd/org-mode-setup () 242(defun jd/org-mode-setup ()
232 (org-indent-mode) 243 (org-indent-mode)
233 (variable-pitch-mode 1) 244 (variable-pitch-mode 1)
@@ -238,7 +249,7 @@
238 :commands (org-capture org-agenda) 249 :commands (org-capture org-agenda)
239 :hook (org-mode . jd/org-mode-setup) 250 :hook (org-mode . jd/org-mode-setup)
240 :config 251 :config
241 (setq org-directory (file-truename "~/Documents/org/")) 252 (setq org-directory (file-truename "~/Documents/Org/"))
242 (setq org-mobile-inbox-for-pull (concat org-directory "flagged.org")) 253 (setq org-mobile-inbox-for-pull (concat org-directory "flagged.org"))
243 (setq org-mobile-directory "~/Dropbox/Apps/MobileOrg") 254 (setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")
244 (setq org-agenda-files 255 (setq org-agenda-files
@@ -303,7 +314,7 @@
303 (set-face-attribute (car face) nil :font "Monospace" :weight 'Bold :height (cdr face))) 314 (set-face-attribute (car face) nil :font "Monospace" :weight 'Bold :height (cdr face)))
304 315
305 ;; Ensure that anything that should be fixed-pitch in Org files appears that way 316 ;; Ensure that anything that should be fixed-pitch in Org files appears that way
306 ;; (set-face-attribute 'org-block nil :font "mononoki Nerd Font" :inherit 'fixed-pitch) 317 (set-face-attribute 'org-block nil :font "hack" :inherit 'fixed-pitch)
307 (set-face-attribute 'org-table nil :inherit 'fixed-pitch) 318 (set-face-attribute 'org-table nil :inherit 'fixed-pitch)
308 (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) 319 (set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
309 (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) 320 (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
@@ -376,7 +387,7 @@
376 387
377(use-package org-roam 388(use-package org-roam
378 :custom 389 :custom
379 (org-roam-directory (file-truename "~/Documents/org/roam/")) 390 (org-roam-directory (file-truename jd/org-roam-home))
380 :bind (("C-c n l" . org-roam-buffer-toggle) 391 :bind (("C-c n l" . org-roam-buffer-toggle)
381 ("C-c n f" . org-roam-node-find) 392 ("C-c n f" . org-roam-node-find)
382 ("C-c n g" . org-roam-graph) 393 ("C-c n g" . org-roam-graph)
@@ -576,8 +587,8 @@
576 (emms-mode-line-disable) 587 (emms-mode-line-disable)
577 ; (setq emms-info-functions '(emms-info-tinytag)) 588 ; (setq emms-info-functions '(emms-info-tinytag))
578 (setq emms-browser-covers 'emms-browser-cache-thumbnail-async) 589 (setq emms-browser-covers 'emms-browser-cache-thumbnail-async)
579 (setq emms-lyrics-dir "~/Documents/music/lyrics") 590 ;; (setq emms-lyrics-dir "~/Documents/music/lyrics")
580 (emms-add-directory-tree "~/Documents/music/")) 591 (emms-add-directory-tree "~/Documents/Music/"))
581 592
582(use-package pdf-tools) 593(use-package pdf-tools)
583 594
diff --git a/Emacs.org b/Emacs.org
index 8b61e73..f2a3c34 100644
--- a/Emacs.org
+++ b/Emacs.org
@@ -236,6 +236,12 @@
236 "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*"))) 236 "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*")))
237 (call-interactively 'counsel-switch-buffer))) 237 (call-interactively 'counsel-switch-buffer)))
238 238
239 (defvar jd/load-theme-hook nil)
240 (defun jd/load-theme ()
241 (interactive)
242 (counsel-load-theme)
243 (run-hooks 'jd/load-theme-hook))
244
239 (use-package ivy 245 (use-package ivy
240 :diminish 246 :diminish
241 :bind 247 :bind
@@ -259,8 +265,9 @@
259#+begin_src emacs-lisp 265#+begin_src emacs-lisp
260 266
261 (jd/leader-key-def 267 (jd/leader-key-def
262 "t" '(:ignore t :which-key "Toogle") 268 "t" '(:ignore t :which-key "Toggle")
263 "tt" '(counsel-load-theme :which-key "Choose theme")) 269 "tT" '(toggle-truncate-lines :which-key "Toggle truncate lines")
270 "tt" '(jd/load-theme :which-key "Choose theme"))
264 271
265 (jd/leader-key-def 272 (jd/leader-key-def
266 "bb" '(jd/switch-buffer :which-key "Buffer switch") 273 "bb" '(jd/switch-buffer :which-key "Buffer switch")
@@ -391,6 +398,14 @@
391* Org 398* Org
392** Org-mode setup 399** Org-mode setup
393 400
401*Define variables*
402
403#+begin_src emacs-lisp
404 (setq jd/org-home "~/Documents/Org")
405 (setq jd/org-roam-home (concat jd/org-home "/roam"))
406 (setq jd/org-roam-daily-home (concat jd/org-home "/roam/daily"))
407#+end_src
408
394#+begin_src emacs-lisp 409#+begin_src emacs-lisp
395 410
396 (defun jd/org-mode-setup () 411 (defun jd/org-mode-setup ()
@@ -603,7 +618,7 @@
603 618
604 (use-package org-roam 619 (use-package org-roam
605 :custom 620 :custom
606 (org-roam-directory (file-truename "~/Documents/Org/roam/")) 621 (org-roam-directory (file-truename jd/org-roam-home))
607 :bind (("C-c n l" . org-roam-buffer-toggle) 622 :bind (("C-c n l" . org-roam-buffer-toggle)
608 ("C-c n f" . org-roam-node-find) 623 ("C-c n f" . org-roam-node-find)
609 ("C-c n g" . org-roam-graph) 624 ("C-c n g" . org-roam-graph)