diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2024-04-27 20:09:08 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2024-04-27 20:09:08 +0200 |
commit | 06e0a80f7b509fc2a565aff9ec8311caf4bf6aae (patch) | |
tree | 8edc05e4a3d05250863bbbaa3bb2228373772612 | |
parent | 73af89d935df5a8166114c9257f9f247f29850bf (diff) | |
download | dotfiles-06e0a80f7b509fc2a565aff9ec8311caf4bf6aae.tar.gz dotfiles-06e0a80f7b509fc2a565aff9ec8311caf4bf6aae.zip |
Remove trash and change name from jd/use-package to use-package!
-rwxr-xr-x | .emacs.d/init.el | 9 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-apps.el | 113 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-custom.el | 27 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-dev.el | 232 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-exwm.el | 252 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-gym.el | 2 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-keys.el | 156 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-mu4e.el | 137 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-org.el | 375 | ||||
-rwxr-xr-x | .emacs.d/jd/jd-ui.el | 88 |
10 files changed, 580 insertions, 811 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index a0cb8a0..d9183a1 100755 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el | |||
@@ -86,9 +86,10 @@ | |||
86 | 86 | ||
87 | (setq use-package-always-ensure (not jd/guix-p)) | 87 | (setq use-package-always-ensure (not jd/guix-p)) |
88 | 88 | ||
89 | (defmacro jd/use-package (package-name | 89 | (defmacro use-package! (package-name |
90 | guix-package-name | 90 | guix-package-name |
91 | &rest body) | 91 | &rest body) |
92 | (declare (indent defun)) | ||
92 | `(progn | 93 | `(progn |
93 | ,(when guix-package-name | 94 | ,(when guix-package-name |
94 | `(jd/add-package-to-manifest ,guix-package-name)) | 95 | `(jd/add-package-to-manifest ,guix-package-name)) |
@@ -121,6 +122,8 @@ | |||
121 | (require 'jd-apps) | 122 | (require 'jd-apps) |
122 | (require 'jd-custom) | 123 | (require 'jd-custom) |
123 | (require 'jd-mu4e) | 124 | (require 'jd-mu4e) |
125 | (require 'jd-misc) | ||
126 | (require 'jd-sway) | ||
124 | 127 | ||
125 | (when jd/exwm-p | 128 | (when jd/exwm-p |
126 | (require 'jd-exwm)) | 129 | (require 'jd-exwm)) |
diff --git a/.emacs.d/jd/jd-apps.el b/.emacs.d/jd/jd-apps.el index 2163435..a831d8d 100755 --- a/.emacs.d/jd/jd-apps.el +++ b/.emacs.d/jd/jd-apps.el | |||
@@ -3,100 +3,39 @@ | |||
3 | 3 | ||
4 | ;;; Code: | 4 | ;;; Code: |
5 | 5 | ||
6 | ;; (defun jd/open-new-vterm (&optional jd/vterm-buffer-name) | 6 | (use-package! vterm "emacs-vterm" |
7 | ;; (interactive) | 7 | :init |
8 | ;; (let ((buffer-name (generate-new-buffer-name vterm-buffer-name))) | 8 | (add-to-list 'project-switch-commands '(project-vterm "Vterm") t) |
9 | ;; (when jd/vterm-buffer-name | 9 | (add-to-list 'project-kill-buffer-conditions '(major-mode . vterm-mode)) |
10 | ;; (setq buffer-name jd/vterm-buffer-name)) | 10 | (setq vterm-copy-exclude-prompt t) |
11 | ;; (switch-to-buffer buffer-name) | ||
12 | ;; (vterm-mode))) | ||
13 | |||
14 | |||
15 | (jd/use-package vterm "emacs-vterm" | ||
16 | :init | ||
17 | (add-to-list 'project-switch-commands '(project-vterm "Vterm") t) | ||
18 | (add-to-list 'project-kill-buffer-conditions '(major-mode . vterm-mode)) | ||
19 | (setq vterm-copy-exclude-prompt t) | ||
20 | :config | ||
21 | (setq vterm-buffer-name "vterm") | ||
22 | ;; (evil-set-initial-state 'vterm-mode 'emacs) | ||
23 | (setq vterm-tramp-shells (append '(("ssh" "/bin/bash")) vterm-tramp-shells)) | ||
24 | |||
25 | (jd/leader-key-def "ot" '(jd/open-new-vterm :which-key "Open terminal in current window"))) | ||
26 | |||
27 | (jd/use-package all-the-icons-dired "emacs-all-the-icons-dired" | ||
28 | :hook (dired-mode . all-the-icons-dired-mode)) | ||
29 | |||
30 | ;; (jd/use-package dired-ranger nil) | ||
31 | |||
32 | (jd/use-package dired nil | ||
33 | :ensure nil | ||
34 | :commands (dired dired-jump) | ||
35 | :custom ((dired-listing-switches "-agho --group-directories-first")) | ||
36 | :config | ||
37 | ;; (evil-collection-define-key 'normal 'dired-mode-map | ||
38 | ;; "y" 'dired-ranger-copy | ||
39 | ;; "p" 'dired-ranger-paste | ||
40 | ;; "X" 'dired-ranger-move | ||
41 | ;; "h" 'dired-up-directory | ||
42 | ;; "t" 'dired-create-empty-file | ||
43 | ;; "T" 'dired-toggle-marks | ||
44 | ;; "l" 'dired-find-file) | ||
45 | (setq dired-kill-when-opening-new-dired-buffer t) | ||
46 | ;; (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer) | ||
47 | ) | ||
48 | |||
49 | (jd/use-package emms "emacs-emms" | ||
50 | :config | 11 | :config |
51 | (require 'emms-setup) | 12 | (setq vterm-buffer-name "vterm") |
52 | (emms-all) | 13 | ;; (evil-set-initial-state 'vterm-mode 'emacs) |
53 | (emms-standard) | 14 | (setq vterm-tramp-shells (append '(("ssh" "/bin/bash")) vterm-tramp-shells)) |
54 | (emms-default-players) | ||
55 | (emms-mode-line-disable) | ||
56 | (setq emms-browser-covers 'emms-browser-cache-thumbnail-async) | ||
57 | (emms-add-directory-tree "~/Documents/Music/")) | ||
58 | |||
59 | (jd/use-package pdf-tools "emacs-pdf-tools") | ||
60 | |||
61 | (jd/use-package elfeed "emacs-elfeed" | ||
62 | :config | ||
63 | (setq elfeed-feeds | ||
64 | '(("https://www.reddit.com/r/emacs.rss" emacs) | ||
65 | ("https://www.reddit.com/r/gnu.rss" gnu) | ||
66 | ("https://stallman.org/rss/rss.xml" stallman) | ||
67 | ("https://news.ycombinator.com/rss" hacker-news)))) | ||
68 | 15 | ||
69 | ;; (jd/use-package langtool | 16 | ) |
70 | ;; :config | ||
71 | ;; (setq langtool-language-tool-jar "/home/jakub/Documents/LanguageTool-6.0/languagetool-commandline.jar") | ||
72 | ;; (setq langtool-default-language "pl-PL")) | ||
73 | 17 | ||
74 | ;; (jd/leader-key-def | 18 | (use-package! all-the-icons-dired "emacs-all-the-icons-dired" |
75 | ;; "l" '(:ignore t :which-key "langtool") | 19 | :hook (dired-mode . all-the-icons-dired-mode)) |
76 | ;; "lc" 'langtool-check-buffer | ||
77 | ;; "ld" 'langtool-check-done | ||
78 | ;; "li" 'langtool-interactive-correction) | ||
79 | 20 | ||
80 | (jd/use-package mastodon "emacs-mastodon" | 21 | (use-package! dired nil |
81 | :config | 22 | :ensure nil |
82 | (setq mastodon-active-user "jdlugosz963" | 23 | :commands (dired dired-jump) |
83 | mastodon-instance-url "https://fosstodon.org/")) | 24 | :custom ((dired-listing-switches "-agho --group-directories-first")) |
84 | 25 | :config | |
85 | (jd/use-package password-store "emacs-password-store" | 26 | (setq dired-kill-when-opening-new-dired-buffer t)) |
86 | :bind | ||
87 | ("C-c P p" . password-store-copy) | ||
88 | ("C-c P i" . password-store-insert) | ||
89 | ("C-c P g" . password-store-generate)) | ||
90 | 27 | ||
91 | (jd/use-package bluetooth "emacs-bluetooth" | 28 | (use-package! pdf-tools "emacs-pdf-tools") |
92 | :bind | ||
93 | ("C-c B" . bluetooth-list-devices)) | ||
94 | 29 | ||
95 | (jd/use-package shell nil | 30 | (use-package! password-store "emacs-password-store" |
96 | :bind | 31 | :bind |
97 | ("C-c C-<return>" . shell)) | 32 | ("C-c P p" . password-store-copy) |
33 | ("C-c P i" . password-store-insert) | ||
34 | ("C-c P g" . password-store-generate)) | ||
98 | 35 | ||
99 | (jd/use-package nov-el "emacs-nov-el") | 36 | (use-package! shell nil |
37 | :bind | ||
38 | ("C-c C-<return>" . shell)) | ||
100 | 39 | ||
101 | (provide 'jd-apps) | 40 | (provide 'jd-apps) |
102 | 41 | ||
diff --git a/.emacs.d/jd/jd-custom.el b/.emacs.d/jd/jd-custom.el index 8383e41..a634baa 100755 --- a/.emacs.d/jd/jd-custom.el +++ b/.emacs.d/jd/jd-custom.el | |||
@@ -3,33 +3,6 @@ | |||
3 | 3 | ||
4 | ;;; Code: | 4 | ;;; Code: |
5 | 5 | ||
6 | (defun jd/generete-qr-from-clipboard () | ||
7 | (interactive) | ||
8 | (let ((clipboard-value (x-get-clipboard)) | ||
9 | (clipboard-file-path "/tmp/clipboard_value.txt") | ||
10 | (clipboard-out-image "/tmp/qr.png")) | ||
11 | (with-temp-file clipboard-file-path | ||
12 | (insert clipboard-value)) | ||
13 | (shell-command (concat | ||
14 | "qrencode -o " | ||
15 | clipboard-out-image | ||
16 | " < " | ||
17 | clipboard-file-path)) | ||
18 | (find-file clipboard-out-image))) | ||
19 | |||
20 | (defun jd/dired-open-file-in-kill-ring () | ||
21 | (interactive) | ||
22 | (let* ((last-killed (car kill-ring)) | ||
23 | (exists-p (file-exists-p last-killed)) | ||
24 | (dir-p (file-directory-p last-killed))) | ||
25 | (cond | ||
26 | ((not exists-p) (message "File doesn't exists!")) | ||
27 | (dir-p (dired last-killed)) | ||
28 | ((not dir-p) (find-file last-killed))))) | ||
29 | |||
30 | (global-set-key (kbd "C-c O") #'jd/dired-open-file-in-kill-ring) | ||
31 | |||
32 | |||
33 | (setq erc-nick "bobbma" | 6 | (setq erc-nick "bobbma" |
34 | erc-user-full-name "Jakub Dlugosz" | 7 | erc-user-full-name "Jakub Dlugosz" |
35 | erc-notify-list '("akuleszaa")) | 8 | erc-notify-list '("akuleszaa")) |
diff --git a/.emacs.d/jd/jd-dev.el b/.emacs.d/jd/jd-dev.el index 1e602d6..4cd3f0c 100755 --- a/.emacs.d/jd/jd-dev.el +++ b/.emacs.d/jd/jd-dev.el | |||
@@ -4,25 +4,24 @@ | |||
4 | ;;; Code: | 4 | ;;; Code: |
5 | 5 | ||
6 | (setq c-default-style "linux" | 6 | (setq c-default-style "linux" |
7 | c-basic-offset 8) | 7 | c-basic-offset 8 |
8 | gdb-many-windows t) | ||
8 | 9 | ||
9 | (setq gdb-many-windows t) | 10 | (use-package! lsp-mode "emacs-lsp-mode" |
11 | :diminish t | ||
12 | :commands (lsp lsp-deferred) | ||
13 | :init | ||
14 | (setq lsp-headerline-breadcrumb-enable nil) | ||
15 | (setq lsp-diagnostics-provider :none) | ||
16 | (setq lsp-modeline-diagnostics-enable nil) | ||
17 | (setq lsp-keymap-prefix "C-c l") | ||
18 | :config | ||
19 | (lsp-enable-which-key-integration t)) | ||
10 | 20 | ||
11 | (jd/use-package lsp-mode "emacs-lsp-mode" | 21 | (use-package! lsp-ivy "emacs-lsp-ivy" |
12 | :diminish t | 22 | :after lsp) |
13 | :commands (lsp lsp-deferred) | ||
14 | :init | ||
15 | (setq lsp-headerline-breadcrumb-enable nil) | ||
16 | (setq lsp-diagnostics-provider :none) | ||
17 | (setq lsp-modeline-diagnostics-enable nil) | ||
18 | (setq lsp-keymap-prefix "C-c l") | ||
19 | :config | ||
20 | (lsp-enable-which-key-integration t)) | ||
21 | 23 | ||
22 | (jd/use-package lsp-ivy "emacs-lsp-ivy" | 24 | (use-package! paredit "emacs-paredit") |
23 | :after lsp) | ||
24 | |||
25 | (jd/use-package paredit "emacs-paredit") | ||
26 | 25 | ||
27 | (defun jd/lisp-mode-setup () | 26 | (defun jd/lisp-mode-setup () |
28 | (rainbow-delimiters-mode) | 27 | (rainbow-delimiters-mode) |
@@ -35,124 +34,89 @@ | |||
35 | (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup) | 34 | (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup) |
36 | (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) | 35 | (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) |
37 | 36 | ||
38 | (jd/use-package rainbow-delimiters "emacs-rainbow-delimiters") | 37 | (use-package! rainbow-delimiters "emacs-rainbow-delimiters") |
39 | 38 | ||
40 | (jd/use-package sly "emacs-sly") | 39 | (use-package! sly "emacs-sly") |
41 | 40 | ||
42 | (jd/use-package geiser "emacs-geiser") | 41 | (use-package! geiser "emacs-geiser") |
43 | (jd/use-package geiser-racket "emacs-geiser-racket") | 42 | (use-package! geiser-racket "emacs-geiser-racket") |
44 | (jd/use-package racket-mode "emacs-racket-mode") | 43 | (use-package! racket-mode "emacs-racket-mode") |
45 | (jd/use-package geiser-guile "emacs-geiser-guile" | 44 | (use-package! geiser-guile "emacs-geiser-guile" |
46 | :config | 45 | :config |
47 | (when jd/guix-p | 46 | (when jd/guix-p |
48 | (defun jd/guix-repl () | 47 | (defun jd/guix-repl () |
49 | (interactive) | 48 | (interactive) |
50 | (let ((geiser-guile-binary '("guix" "repl")) | 49 | (let ((geiser-guile-binary '("guix" "repl")) |
51 | (geiser-guile-load-path (cons "~/dotfiles/guix" geiser-guile-load-path))) | 50 | (geiser-guile-load-path (cons "~/dotfiles/guix" geiser-guile-load-path))) |
52 | (geiser 'guile))))) | 51 | (geiser 'guile))))) |
53 | 52 | ||
54 | (jd/use-package pyvenv "emacs-pyvenv" | 53 | (use-package! pyvenv "emacs-pyvenv" |
55 | :after python-mode) | 54 | :after python-mode) |
56 | 55 | ||
57 | (jd/use-package typescript-mode "emacs-typescript-mode" | 56 | (use-package! typescript-mode "emacs-typescript-mode" |
58 | :mode ("\\.ts\\'") | 57 | :mode ("\\.ts\\'") |
59 | :config | 58 | :config |
60 | (setq typescript-indent-level 2)) | 59 | (setq typescript-indent-level 2)) |
61 | 60 | ||
62 | (jd/use-package cider "emacs-cider") | 61 | (use-package! cider "emacs-cider") |
63 | 62 | ||
64 | (jd/use-package tide "emacs-tide" | 63 | (use-package! tide "emacs-tide" |
65 | :after (typescript-mode company web-mode)) | 64 | :after (typescript-mode company web-mode)) |
66 | 65 | ||
67 | (jd/use-package flycheck "emacs-flycheck" | 66 | (use-package! flycheck "emacs-flycheck" |
68 | :hook ((after-init . global-flycheck-mode))) | 67 | :hook ((after-init . global-flycheck-mode))) |
69 | 68 | ||
70 | (jd/use-package web-mode "emacs-web-mode" | 69 | (use-package! web-mode "emacs-web-mode" |
71 | ;; :hook ((web-mode . jd/activate-tide-mode)) | 70 | :mode |
72 | :mode | 71 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") |
73 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") | 72 | :config |
74 | :config | 73 | (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'"))) |
75 | (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'"))) | 74 | (setq web-mode-markup-indent-offset 2) |
76 | (setq web-mode-markup-indent-offset 2) | 75 | (setq web-mode-css-indent-offset 2) |
77 | (setq web-mode-css-indent-offset 2) | 76 | (setq web-mode-code-indent-offset 2) |
78 | (setq web-mode-code-indent-offset 2) | 77 | (setq web-mode-script-padding 2) |
79 | (setq web-mode-script-padding 2) | 78 | (setq web-mode-block-padding 2) |
80 | (setq web-mode-block-padding 2) | 79 | (setq web-mode-style-padding 2) |
81 | (setq web-mode-style-padding 2) | 80 | (setq web-mode-enable-auto-pairing t) |
82 | (setq web-mode-enable-auto-pairing t) | 81 | (setq web-mode-enable-auto-closing t) |
83 | (setq web-mode-enable-auto-closing t) | 82 | (setq web-mode-enable-current-element-highlight t)) |
84 | (setq web-mode-enable-current-element-highlight t)) | 83 | |
85 | 84 | (use-package! yaml-mode "emacs-yaml-mode") | |
86 | (jd/use-package yaml-mode "emacs-yaml-mode") | 85 | |
87 | 86 | (use-package! docker "emacs-docker" | |
88 | (jd/use-package docker "emacs-docker" | 87 | :bind |
89 | :bind | 88 | ("C-c D d" . docker-containers) |
90 | ("C-c D d" . docker-containers) | 89 | ("C-c D D" . docker)) |
91 | ("C-c D D" . docker) | 90 | |
92 | :config | 91 | (use-package! company "emacs-company" |
93 | (jd/leader-key-def | 92 | :diminish t |
94 | "d" '(:ignore t :which-key "Docker") | 93 | :after lsp-mode |
95 | "dc" '(docker-containers :which-key "Docker containers") | 94 | :hook (lsp-mode . company-mode) |
96 | "dd" '(docker :which-key "Docker"))) | 95 | :bind (:map company-active-map |
97 | 96 | ("<tab>" . company-complete-selection)) | |
98 | (jd/use-package company "emacs-company" | 97 | (:map lsp-mode-map |
99 | :diminish t | 98 | ("<tab>" . company-indent-or-complete-common)) |
100 | :after lsp-mode | 99 | :custom |
101 | :hook (lsp-mode . company-mode) | 100 | (company-minimum-prefix-length 1) |
102 | :bind (:map company-active-map | 101 | (company-idle-delay 0.0) |
103 | ("<tab>" . company-complete-selection)) | 102 | :config |
104 | (:map lsp-mode-map | 103 | (global-company-mode)) |
105 | ("<tab>" . company-indent-or-complete-common)) | 104 | |
106 | :custom | 105 | (use-package! projectile "emacs-projectile" |
107 | (company-minimum-prefix-length 1) | 106 | :diminish projectile-mode |
108 | (company-idle-delay 0.0) | 107 | :init |
109 | :config | 108 | (when (file-directory-p "~/Documents/code") |
110 | (global-company-mode)) | 109 | (setq projectile-project-search-path '("~/Documents/code/"))) |
111 | 110 | :custom ((projectile-Completion-system 'ivy)) | |
112 | ;; (jd/use-package company-box "emacs-company-box" | 111 | :config |
113 | ;; :diminish t | 112 | (setq projectile-switch-project-action #'projectile-dired) |
114 | ;; :hook (company-mode . company-box-mode)) | 113 | (projectile-mode)) |
115 | 114 | ||
116 | (jd/use-package projectile "emacs-projectile" | 115 | (use-package! magit "emacs-magit" |
117 | :diminish projectile-mode | 116 | :custom |
118 | :init | 117 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) |
119 | (when (file-directory-p "~/Documents/code") | 118 | |
120 | (setq projectile-project-search-path '("~/Documents/code/"))) | 119 | (use-package! restclient "emacs-restclient") |
121 | :custom ((projectile-Completion-system 'ivy)) | ||
122 | :config | ||
123 | (setq projectile-switch-project-action #'projectile-dired) | ||
124 | (projectile-mode) | ||
125 | |||
126 | (jd/leader-key-def | ||
127 | "p" '(projectile-command-map :which-key "Project") | ||
128 | "p <ESC>" '() | ||
129 | "SPC" '(projectile-find-file :which-key "Find file in project"))) | ||
130 | |||
131 | (jd/use-package neotree "emacs-neotree" | ||
132 | :init | ||
133 | (setq neo-theme 'icons) | ||
134 | :config | ||
135 | (jd/leader-key-def | ||
136 | "op" '(jd/neotree-project-dir :which-key "Open neotree")) | ||
137 | |||
138 | (defun jd/neotree-project-dir () | ||
139 | "Open NeoTree using the git root." | ||
140 | (interactive) | ||
141 | (let ((project-dir (projectile-project-root)) | ||
142 | (file-name (buffer-file-name))) | ||
143 | (neotree-toggle) | ||
144 | (if project-dir | ||
145 | (if (neo-global--window-exists-p) | ||
146 | (progn | ||
147 | (neotree-dir project-dir) | ||
148 | (neotree-find file-name))) | ||
149 | (message "Could not find git project root."))))) | ||
150 | |||
151 | (jd/use-package magit "emacs-magit" | ||
152 | :custom | ||
153 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) | ||
154 | |||
155 | (jd/use-package restclient "emacs-restclient") | ||
156 | 120 | ||
157 | (setq sql-connection-alist | 121 | (setq sql-connection-alist |
158 | '(("net47-abaks" | 122 | '(("net47-abaks" |
diff --git a/.emacs.d/jd/jd-exwm.el b/.emacs.d/jd/jd-exwm.el index f083c44..98b5e89 100755 --- a/.emacs.d/jd/jd-exwm.el +++ b/.emacs.d/jd/jd-exwm.el | |||
@@ -4,132 +4,132 @@ | |||
4 | ;;; Code: | 4 | ;;; Code: |
5 | 5 | ||
6 | 6 | ||
7 | (jd/use-package perspective "emacs-perspective") | 7 | (use-package! perspective "emacs-perspective") |
8 | 8 | ||
9 | (jd/use-package exwm "emacs-exwm" | 9 | (use-package! exwm "emacs-exwm" |
10 | :config | 10 | :config |
11 | (defun jd/exwm-update-class () | 11 | (defun jd/exwm-update-class () |
12 | (exwm-workspace-rename-buffer exwm-class-name)) | 12 | (exwm-workspace-rename-buffer exwm-class-name)) |
13 | 13 | ||
14 | (defun jd-exwm/run-in-background (command) | 14 | (defun jd-exwm/run-in-background (command) |
15 | (let ((command-parts (split-string command "[ ]+"))) | 15 | (let ((command-parts (split-string command "[ ]+"))) |
16 | (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) | 16 | (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) |
17 | 17 | ||
18 | (defun jd-exwm/restart-process (program-name) | 18 | (defun jd-exwm/restart-process (program-name) |
19 | (call-process "killall" nil nil nil program-name) | 19 | (call-process "killall" nil nil nil program-name) |
20 | (jd-exwm/run-in-background program-name)) | 20 | (jd-exwm/run-in-background program-name)) |
21 | 21 | ||
22 | (defun jd-exwm/exwm-init-hook () | 22 | (defun jd-exwm/exwm-init-hook () |
23 | (jd-exwm/run-in-background "nitrogen --restore") | 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") | 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") | 25 | (start-process-shell-command "syndaemon" nil "syndaemon -i 0.8 -K -R -d") |
26 | 26 | ||
27 | (jd-exwm/restart-process "polybar") | 27 | (jd-exwm/restart-process "polybar") |
28 | (jd-exwm/restart-process "nm-applet") | 28 | (jd-exwm/restart-process "nm-applet") |
29 | (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") | 29 | (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") |
30 | (jd-exwm/restart-process "blueman-applet")) | 30 | (jd-exwm/restart-process "blueman-applet")) |
31 | 31 | ||
32 | (defun jd-exwm/exwm-update-title () | 32 | (defun jd-exwm/exwm-update-title () |
33 | (exwm-workspace-rename-buffer exwm-title)) | 33 | (exwm-workspace-rename-buffer exwm-title)) |
34 | 34 | ||
35 | (defun jd-exwm/configure-window-by-class () | 35 | (defun jd-exwm/configure-window-by-class () |
36 | (interactive) | 36 | (interactive) |
37 | (pcase exwm-class-name | 37 | (pcase exwm-class-name |
38 | ("firefox" (exwm-workspace-move-window 2)) | 38 | ("firefox" (exwm-workspace-move-window 2)) |
39 | ("Brave" (exwm-workspace-move-window 2)) | 39 | ("Brave" (exwm-workspace-move-window 2)) |
40 | ("qutebrowser" (exwm-workspace-move-window 2)) | 40 | ("qutebrowser" (exwm-workspace-move-window 2)) |
41 | ("discord" (exwm-workspace-move-window 5)) | 41 | ("discord" (exwm-workspace-move-window 5)) |
42 | ("obs" (exwm-workspace-move-window 5)) | 42 | ("obs" (exwm-workspace-move-window 5)) |
43 | ("Virt-manager" (exwm-workspace-move-window 4)))) | 43 | ("Virt-manager" (exwm-workspace-move-window 4)))) |
44 | 44 | ||
45 | (setq exwm-workspace-number 10) | 45 | (setq exwm-workspace-number 10) |
46 | 46 | ||
47 | ;; (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) | 47 | ;; (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) |
48 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) | 48 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) |
49 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) | 49 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) |
50 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) | 50 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) |
51 | 51 | ||
52 | (require 'exwm-randr) | 52 | (require 'exwm-randr) |
53 | (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) | 53 | (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) |
54 | (exwm-randr-enable) | 54 | (exwm-randr-enable) |
55 | 55 | ||
56 | (setq exwm-input-simulation-keys | 56 | (setq exwm-input-simulation-keys |
57 | '(([?\C-b] . [left]) | 57 | '(([?\C-b] . [left]) |
58 | ([?\C-f] . [right]) | 58 | ([?\C-f] . [right]) |
59 | ([?\C-p] . [up]) | 59 | ([?\C-p] . [up]) |
60 | ([?\C-n] . [down]) | 60 | ([?\C-n] . [down]) |
61 | ([?\C-a] . [home]) | 61 | ([?\C-a] . [home]) |
62 | ([?\C-e] . [end]) | 62 | ([?\C-e] . [end]) |
63 | ([?\C-k] . [S-end delete]) | 63 | ([?\C-k] . [S-end delete]) |
64 | ([?\M-w] . [C-c]) | 64 | ([?\M-w] . [C-c]) |
65 | ([?\C-y] . [C-v]) | 65 | ([?\C-y] . [C-v]) |
66 | ([?\C-v] . [next]) | 66 | ([?\C-v] . [next]) |
67 | ([?\M-v] . [prior]) | 67 | ([?\M-v] . [prior]) |
68 | )) | 68 | )) |
69 | 69 | ||
70 | (setq exwm-input-prefix-keys | 70 | (setq exwm-input-prefix-keys |
71 | '(?\C-x | 71 | '(?\C-x |
72 | ?\C-u | 72 | ?\C-u |
73 | ?\C-h | 73 | ?\C-h |
74 | ?\M-x | 74 | ?\M-x |
75 | ?\M-` | 75 | ?\M-` |
76 | ?\M-& | 76 | ?\M-& |
77 | ?\M-! | 77 | ?\M-! |
78 | ?\C-g | 78 | ?\C-g |
79 | ?\M-: | 79 | ?\M-: |
80 | ?\C-\M-j | 80 | ?\C-\M-j |
81 | ?\C-\ )) | 81 | ?\C-\ )) |
82 | 82 | ||
83 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) | 83 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) |
84 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) | 84 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) |
85 | 85 | ||
86 | (setq exwm-input-global-keys | 86 | (setq exwm-input-global-keys |
87 | `(([?\s-R] . exwm-reset) | 87 | `(([?\s-R] . exwm-reset) |
88 | 88 | ||
89 | 89 | ||
90 | ([?\s-r] . (lambda (command) | 90 | ([?\s-r] . (lambda (command) |
91 | (interactive (list (read-shell-command "$ "))) | 91 | (interactive (list (read-shell-command "$ "))) |
92 | (start-process-shell-command command nil command))) | 92 | (start-process-shell-command command nil command))) |
93 | 93 | ||
94 | ([?\s-W] . exwm-workspace-move-window) | 94 | ([?\s-W] . exwm-workspace-move-window) |
95 | ([?\s-w] . exwm-workspace-switch) | 95 | ([?\s-w] . exwm-workspace-switch) |
96 | 96 | ||
97 | ,@(mapcar (lambda (i) | 97 | ,@(mapcar (lambda (i) |
98 | `(,(kbd (format "s-%d" i)) . | 98 | `(,(kbd (format "s-%d" i)) . |
99 | (lambda () | 99 | (lambda () |
100 | (interactive) | 100 | (interactive) |
101 | (exwm-workspace-switch-create ,i)))) | 101 | (exwm-workspace-switch-create ,i)))) |
102 | (number-sequence 0 9)))) | 102 | (number-sequence 0 9)))) |
103 | 103 | ||
104 | (exwm-enable) | 104 | (exwm-enable) |
105 | (require 'exwm-systemtray) | 105 | (require 'exwm-systemtray) |
106 | (exwm-systemtray-enable)) | 106 | (exwm-systemtray-enable)) |
107 | 107 | ||
108 | (jd/use-package desktop-environment "emacs-desktop-environment" | 108 | (use-package! desktop-environment "emacs-desktop-environment" |
109 | :after exwm | 109 | :after exwm |
110 | :custom | 110 | :custom |
111 | (desktop-environment-brightness-small-increment "2%+") | 111 | (desktop-environment-brightness-small-increment "2%+") |
112 | (desktop-environment-brightness-small-decrement "2%-") | 112 | (desktop-environment-brightness-small-decrement "2%-") |
113 | (desktop-environment-brightness-normal-increment "5%+") | 113 | (desktop-environment-brightness-normal-increment "5%+") |
114 | (desktop-environment-brightness-normal-decrement "5%-") | 114 | (desktop-environment-brightness-normal-decrement "5%-") |
115 | 115 | ||
116 | :config | 116 | :config |
117 | (defun jd/dunst-show-history () | 117 | (defun jd/dunst-show-history () |
118 | (interactive) | 118 | (interactive) |
119 | (start-process-shell-command "dunstctl" nil "dunstctl history-pop")) | 119 | (start-process-shell-command "dunstctl" nil "dunstctl history-pop")) |
120 | (global-set-key (kbd "C-c N h") #'jd/dunst-show-history) | 120 | (global-set-key (kbd "C-c N h") #'jd/dunst-show-history) |
121 | 121 | ||
122 | (defun jd/dunst-close () | 122 | (defun jd/dunst-close () |
123 | (interactive) | 123 | (interactive) |
124 | (start-process-shell-command "dunstctl" nil "dunstctl close")) | 124 | (start-process-shell-command "dunstctl" nil "dunstctl close")) |
125 | (global-set-key (kbd "C-c N c") #'jd/dunst-close) | 125 | (global-set-key (kbd "C-c N c") #'jd/dunst-close) |
126 | 126 | ||
127 | (defun jd/dunst-close-all () | 127 | (defun jd/dunst-close-all () |
128 | (interactive) | 128 | (interactive) |
129 | (start-process-shell-command "dunstctl" nil "dunstctl close-all")) | 129 | (start-process-shell-command "dunstctl" nil "dunstctl close-all")) |
130 | (global-set-key (kbd "C-c N a") #'jd/dunst-close-all) | 130 | (global-set-key (kbd "C-c N a") #'jd/dunst-close-all) |
131 | 131 | ||
132 | (desktop-environment-mode)) | 132 | (desktop-environment-mode)) |
133 | 133 | ||
134 | ;; (set-frame-parameter (selected-frame) 'alpha '(90 . 90)) | 134 | ;; (set-frame-parameter (selected-frame) 'alpha '(90 . 90)) |
135 | ;; (add-to-list 'default-frame-alist `(alpha . (90 . 90))) | 135 | ;; (add-to-list 'default-frame-alist `(alpha . (90 . 90))) |
diff --git a/.emacs.d/jd/jd-gym.el b/.emacs.d/jd/jd-gym.el index 2602e3e..581bf65 100755 --- a/.emacs.d/jd/jd-gym.el +++ b/.emacs.d/jd/jd-gym.el | |||
@@ -71,7 +71,7 @@ | |||
71 | (let ((table-name (car table)) | 71 | (let ((table-name (car table)) |
72 | (table-data (cdr table))) | 72 | (table-data (cdr table))) |
73 | (emacsql jd-gym/db--conn [:insert :into $i1 | 73 | (emacsql jd-gym/db--conn [:insert :into $i1 |
74 | :values $v2] | 74 | :values $v2] |
75 | table-name table-data))) | 75 | table-name table-data))) |
76 | jd-gym/db--test-data)) | 76 | jd-gym/db--test-data)) |
77 | 77 | ||
diff --git a/.emacs.d/jd/jd-keys.el b/.emacs.d/jd/jd-keys.el index 26a6445..108c70c 100755 --- a/.emacs.d/jd/jd-keys.el +++ b/.emacs.d/jd/jd-keys.el | |||
@@ -1,124 +1,46 @@ | |||
1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config |
2 | ;;; Commentary: | 2 | ;;; Commentary: |
3 | 3 | ;; Custom keysets used in my emacs | |
4 | ;;; Code: | 4 | ;;; Code: |
5 | 5 | ||
6 | ;; (jd/use-package evil "emacs-evil" | 6 | (use-package! multiple-cursors "emacs-multiple-cursors" |
7 | ;; :init | 7 | :config |
8 | ;; (setq evil-want-integration t) | 8 | (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) |
9 | ;; (setq evil-want-keybinding nil) | 9 | (global-set-key (kbd "C->") 'mc/mark-next-like-this) |
10 | ;; (setq evil-want-C-u-scroll t) | 10 | (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) |
11 | ;; (setq evil-want-Y-yank-to-eol t) | 11 | (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) |
12 | ;; (setq evil-want-C-i-jump nil) | 12 | |
13 | ;; (setq evil-undo-system 'undo-tree) | 13 | |
14 | ;; (setq evil-kill-on-visual-paste nil) | 14 | (use-package! hydra "emacs-hydra" |
15 | ;; :config | 15 | ;; :defer t |
16 | ;; (evil-set-initial-state 'exwm-mode 'emacs) | 16 | :config |
17 | ;; (evil-mode 1)) | 17 | (defun jd/text-scale-increase () |
18 | 18 | (interactive) | |
19 | (jd/use-package multiple-cursors "emacs-multiple-cursors" | 19 | (let ((old-face-attribute (face-attribute 'default :height))) |
20 | :config | 20 | (set-face-attribute 'default nil :height (+ old-face-attribute 10)))) |
21 | (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) | 21 | |
22 | (global-set-key (kbd "C->") 'mc/mark-next-like-this) | 22 | (defun jd/text-scale-decrease () |
23 | (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) | 23 | (interactive) |
24 | (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) | 24 | (let ((old-face-attribute (face-attribute 'default :height))) |
25 | 25 | (set-face-attribute 'default nil :height (- old-face-attribute 10)))) | |
26 | (jd/use-package shackle "emacs-shackle") | 26 | |
27 | (jd/use-package sway "emacs-sway") | 27 | (defhydra hydra-text-scale-global (:timeout 4) |
28 | 28 | "scale text" | |
29 | (jd/use-package general "emacs-general" | 29 | ("j" jd/text-scale-increase "in") |
30 | :config | 30 | ("k" jd/text-scale-decrease "out") |
31 | (general-create-definer jd/leader-key-def | 31 | ("q" nil "finished" :exit t)) ;; TODO not working |
32 | :keymaps '(normal insert visual emacs) | 32 | |
33 | :prefix "SPC" | 33 | (defhydra hydra-text-scale (:timeout 4) |
34 | :global-prefix "C-z") | 34 | "scale text" |
35 | 35 | ("j" text-scale-increase "in") | |
36 | (general-create-definer jd/ctrl-c-keys | 36 | ("k" text-scale-decrease "out") |
37 | :prefix "C-c") | 37 | ("q" nil "finished" :exit t))) |
38 | 38 | ||
39 | ;; (jd/leader-key-def | 39 | (use-package! undo-tree "emacs-undo-tree" |
40 | ;; "w" 'evil-window-map | 40 | :diminish |
41 | ;; "wr" '(hydra-resize-window/body :which-key "Rezize window") | 41 | :config |
42 | ;; "wd" '(evil-window-delete :which-key "Window delete")) | 42 | (setq undo-tree-auto-save-history nil) |
43 | 43 | (global-undo-tree-mode 1)) | |
44 | (jd/leader-key-def | ||
45 | "ou" '(undo-tree-visualize :which-key "Open")) | ||
46 | |||
47 | ;; remove . key | ||
48 | ;; (define-key evil-normal-state-map (kbd ".") '()) | ||
49 | (jd/leader-key-def | ||
50 | "f" '(:ignore t :which-key "Files") | ||
51 | "fs" '(save-buffer :which-key "File save") | ||
52 | "." '(find-file :which-key "Find file") | ||
53 | "ff" '(find-file :which-key "Find file")) | ||
54 | |||
55 | (jd/leader-key-def | ||
56 | "e" '(:ignore t :which-key "Eval") | ||
57 | "eb" '(eval-buffer :which-key "Eval buffer") | ||
58 | "ee" '(eval-defun :which-key "Eval defun")) | ||
59 | |||
60 | (jd/leader-key-def | ||
61 | :keymaps '(visual) | ||
62 | "er" '(eval-region :which-key "Eval region")) | ||
63 | |||
64 | (defun jd/kill-other-buffers () | ||
65 | (interactive) | ||
66 | (mapc 'kill-buffer (cdr (buffer-list (current-buffer))))) | ||
67 | |||
68 | (jd/leader-key-def | ||
69 | "bK" '(jd/kill-other-buffers :which-key "Kill other buffers") | ||
70 | "bk" '(kill-current-buffer :which-key "Kill buffer") | ||
71 | "bB" '(ibuffer :which-key "Open ibuffer"))) | ||
72 | |||
73 | |||
74 | (jd/use-package hydra "emacs-hydra" | ||
75 | ;; :defer t | ||
76 | :config | ||
77 | (defun jd/text-scale-increase () | ||
78 | (interactive) | ||
79 | (let ((old-face-attribute (face-attribute 'default :height))) | ||
80 | (set-face-attribute 'default nil :height (+ old-face-attribute 10)))) | ||
81 | |||
82 | (defun jd/text-scale-decrease () | ||
83 | (interactive) | ||
84 | (let ((old-face-attribute (face-attribute 'default :height))) | ||
85 | (set-face-attribute 'default nil :height (- old-face-attribute 10)))) | ||
86 | |||
87 | ;; (defhydra hydra-resize-window (:timeout 4) | ||
88 | ;; ("h" evil-window-decrease-width "<") | ||
89 | ;; ("l" evil-window-increase-width ">") | ||
90 | ;; ("k" evil-window-decrease-height "^") | ||
91 | ;; ("j" evil-window-increase-height "v") | ||
92 | ;; ("q" nil "finished" :exit t)) | ||
93 | |||
94 | (defhydra hydra-text-scale-global (:timeout 4) | ||
95 | "scale text" | ||
96 | ("j" jd/text-scale-increase "in") | ||
97 | ("k" jd/text-scale-decrease "out") | ||
98 | ("q" nil "finished" :exit t)) | ||
99 | |||
100 | (defhydra hydra-text-scale (:timeout 4) | ||
101 | "scale text" | ||
102 | ("j" text-scale-increase "in") | ||
103 | ("k" text-scale-decrease "out") | ||
104 | ("q" nil "finished" :exit t)) | ||
105 | |||
106 | (jd/leader-key-def | ||
107 | "tS" '(hydra-text-scale-global/body :which-key "Scale text") | ||
108 | "ts" '(hydra-text-scale/body :which-key "Scale text"))) | ||
109 | |||
110 | |||
111 | (jd/use-package undo-tree "emacs-undo-tree" | ||
112 | :diminish | ||
113 | :config | ||
114 | (setq undo-tree-auto-save-history nil) | ||
115 | (global-undo-tree-mode 1)) | ||
116 | |||
117 | ;; (jd/use-package evil-collection "emacs-evil-collection" | ||
118 | ;; :after evil | ||
119 | ;; :config | ||
120 | ;; (evil-collection-init)) | ||
121 | |||
122 | 44 | ||
123 | (provide 'jd-keys) | 45 | (provide 'jd-keys) |
124 | 46 | ||
diff --git a/.emacs.d/jd/jd-mu4e.el b/.emacs.d/jd/jd-mu4e.el index cb81c5c..aa0355c 100755 --- a/.emacs.d/jd/jd-mu4e.el +++ b/.emacs.d/jd/jd-mu4e.el | |||
@@ -1,86 +1,83 @@ | |||
1 | (when (not jd/guix-p) | 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config |
2 | (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")) | 2 | ;;; Commentary: |
3 | 3 | ||
4 | (jd/use-package htmlize "emacs-htmlize") | 4 | ;;; Code: |
5 | |||
6 | (use-package! htmlize "emacs-htmlize") | ||
5 | 7 | ||
6 | (jd/add-package-to-manifest "isync") | 8 | (jd/add-package-to-manifest "isync") |
7 | 9 | ||
8 | (jd/use-package mu4e "mu" | 10 | (use-package! mu4e "mu" |
9 | :defer 10 | 11 | :defer 10 |
10 | :ensure nil | 12 | :ensure nil |
11 | :bind | 13 | :bind |
12 | ("C-c M" . mu4e) | 14 | ("C-c M" . mu4e) |
13 | :config | 15 | :config |
14 | ;a (require 'org-mu4e) | 16 | ;a (require 'org-mu4e) |
15 | 17 | ||
16 | (if jd/guix-p | 18 | (unless jd/guix-p |
17 | (setq mu4e-mu-binary "/home/jakub/.guix-extra-profiles/emacs/emacs/bin/mu") | 19 | (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e") |
18 | (setq mu4e-mu-binary "/usr/local/bin/mu")) | 20 | (setq mu4e-mu-binary "/usr/local/bin/mu")) |
19 | |||
20 | (setq mu4e-update-interval (* 10 60)) | ||
21 | (setq mu4e-get-mail-command "mbsync -a") | ||
22 | (setq mu4e-maildir "~/Mail") | ||
23 | 21 | ||
24 | (setq mu4e-completing-read-function #'ivy-completing-read) | 22 | (setq mu4e-update-interval (* 10 60)) |
23 | (setq mu4e-get-mail-command "mbsync -a") | ||
24 | (setq mu4e-maildir "~/Mail") | ||
25 | 25 | ||
26 | (setq mu4e-change-filenames-when-moving t) | 26 | (setq mu4e-completing-read-function #'ivy-completing-read) |
27 | 27 | ||
28 | (setq mu4e-contexts | 28 | (setq mu4e-change-filenames-when-moving t) |
29 | `(,(make-mu4e-context | ||
30 | :name "Abaks" | ||
31 | :match-func (lambda (msg) (when msg | ||
32 | (string-prefix-p "/abaks" (mu4e-message-field msg :maildir)))) | ||
33 | :vars '( | ||
34 | (user-full-name . "Jakub Dlugosz") | ||
35 | (user-mail-address . "jakub@abaks.pl") | ||
36 | (mu4e-sent-folder . "/abaks/Sent Items") | ||
37 | (mu4e-trash-folder . "/abaks/Trash") | ||
38 | (mu4e-drafts-folder . "/abaks/Drafts") | ||
39 | (mu4e-refile-folder . "/abaks/Archive") | ||
40 | (mu4e-sent-messages-behavior . sent) | ||
41 | (smtpmail-local-domain . "pl") | ||
42 | (smtpmail-smtp-server . "smtp.abaks.pl") | ||
43 | (smtpmail-smtp-user . "jakub@abaks.pl"))) | ||
44 | ,(make-mu4e-context | ||
45 | :name "Gmail" | ||
46 | :match-func (lambda (msg) (when msg | ||
47 | (string-prefix-p "/gmail" (mu4e-message-field msg :maildir)))) | ||
48 | :vars '( | ||
49 | (user-full-name . "Jakub Dlugosz") | ||
50 | (user-mail-address . "jdlugosz963@gmail.com") | ||
51 | (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane") | ||
52 | (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz") | ||
53 | (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze") | ||
54 | (mu4e-refile-folder . "/gmail/Archive") | ||
55 | (smtpmail-local-domain . "com") | ||
56 | (smtpmail-smtp-server . "smtp.gmail.com") | ||
57 | (smtpmail-smtp-user . "jdlugosz963@gmail.com") | ||
58 | (mu4e-sent-messages-behavior . sent))))) | ||
59 | 29 | ||
60 | (setq mail-user-agent 'mu4e-user-agent | 30 | (setq mu4e-contexts |
61 | mail-host-address nil | 31 | `(,(make-mu4e-context |
62 | message-send-mail-function 'smtpmail-send-it | 32 | :name "Abaks" |
63 | smtpmail-smtp-service 465 | 33 | :match-func (lambda (msg) (when msg |
64 | smtpmail-stream-type 'ssl | 34 | (string-prefix-p "/abaks" (mu4e-message-field msg :maildir)))) |
65 | smtpmail-servers-requiring-authorization ".*") | 35 | :vars '( |
36 | (user-full-name . "Jakub Dlugosz") | ||
37 | (user-mail-address . "jakub@abaks.pl") | ||
38 | (mu4e-sent-folder . "/abaks/Sent Items") | ||
39 | (mu4e-trash-folder . "/abaks/Trash") | ||
40 | (mu4e-drafts-folder . "/abaks/Drafts") | ||
41 | (mu4e-refile-folder . "/abaks/Archive") | ||
42 | (mu4e-sent-messages-behavior . sent) | ||
43 | (smtpmail-local-domain . "pl") | ||
44 | (smtpmail-smtp-server . "smtp.abaks.pl") | ||
45 | (smtpmail-smtp-user . "jakub@abaks.pl"))) | ||
46 | ,(make-mu4e-context | ||
47 | :name "Gmail" | ||
48 | :match-func (lambda (msg) (when msg | ||
49 | (string-prefix-p "/gmail" (mu4e-message-field msg :maildir)))) | ||
50 | :vars '( | ||
51 | (user-full-name . "Jakub Dlugosz") | ||
52 | (user-mail-address . "jdlugosz963@gmail.com") | ||
53 | (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane") | ||
54 | (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz") | ||
55 | (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze") | ||
56 | (mu4e-refile-folder . "/gmail/Archive") | ||
57 | (smtpmail-local-domain . "com") | ||
58 | (smtpmail-smtp-server . "smtp.gmail.com") | ||
59 | (smtpmail-smtp-user . "jdlugosz963@gmail.com") | ||
60 | (mu4e-sent-messages-behavior . sent))))) | ||
66 | 61 | ||
67 | (setq mu4e-compose-signature (concat | 62 | (setq mail-user-agent 'mu4e-user-agent |
68 | "Pozdrawiam,\n" | 63 | mail-host-address nil |
69 | "Jakub Długosz")) | 64 | message-send-mail-function 'smtpmail-send-it |
65 | smtpmail-smtp-service 465 | ||
66 | smtpmail-stream-type 'ssl | ||
67 | smtpmail-servers-requiring-authorization ".*") | ||
70 | 68 | ||
71 | (mu4e t) | 69 | (setq mu4e-compose-signature (concat |
72 | (mu4e-modeline-mode nil)) | 70 | "Pozdrawiam,\n" |
71 | "Jakub Długosz")) | ||
73 | 72 | ||
74 | (jd/use-package mu4e-alert "emacs-mu4e-alert" | 73 | (mu4e t) |
75 | :defer 20 | 74 | (mu4e-modeline-mode nil)) |
76 | :config | ||
77 | (mu4e-alert-set-default-style 'libnotify) | ||
78 | (mu4e-alert-enable-mode-line-display) | ||
79 | (mu4e-alert-enable-notifications) | ||
80 | 75 | ||
81 | (jd/leader-key-def | 76 | (use-package! mu4e-alert "emacs-mu4e-alert" |
82 | "m" '(:ignore t :which-key "mail") | 77 | :defer 20 |
83 | "mm" 'mu4e | 78 | :config |
84 | "mc" 'mu4e-compose-new)) | 79 | (mu4e-alert-set-default-style 'libnotify) |
80 | (mu4e-alert-enable-mode-line-display) | ||
81 | (mu4e-alert-enable-notifications)) | ||
85 | 82 | ||
86 | (provide 'jd-mu4e) | 83 | (provide 'jd-mu4e) |
diff --git a/.emacs.d/jd/jd-org.el b/.emacs.d/jd/jd-org.el index a9565f3..ff15b59 100755 --- a/.emacs.d/jd/jd-org.el +++ b/.emacs.d/jd/jd-org.el | |||
@@ -13,199 +13,188 @@ | |||
13 | (visual-line-mode 1)) | 13 | (visual-line-mode 1)) |
14 | 14 | ||
15 | (defun jd-emacs/org-insert-date (&optional date) | 15 | (defun jd-emacs/org-insert-date (&optional date) |
16 | (let ((d (or date "+0d"))) | 16 | (org-insert-time-stamp (org-read-date nil t (or date "+0d")))) |
17 | (org-insert-time-stamp (org-read-date nil t d)))) | 17 | |
18 | 18 | (use-package! org-pomodoro "emacs-org-pomodoro") | |
19 | (jd/use-package org-pomodoro "emacs-org-pomodoro") | 19 | |
20 | 20 | (use-package! org "emacs-org" | |
21 | (jd/use-package org "emacs-org" | 21 | :pin org |
22 | :pin org | 22 | :commands (org-capture org-agenda) |
23 | :commands (org-capture org-agenda) | 23 | :hook (org-mode . jd/org-mode-init) |
24 | :hook (org-mode . jd/org-mode-init) | 24 | :bind |
25 | :bind | 25 | ("C-c o c" . #'org-capture) |
26 | ("C-c o c" . #'org-capture) | 26 | ("C-c o p" . #'org-mobile-pull) |
27 | ("C-c o p" . #'org-mobile-pull) | 27 | ("C-c o P" . #'org-mobile-push) |
28 | ("C-c o P" . #'org-mobile-push) | 28 | ("C-c o a" . #'org-agenda) |
29 | ("C-c o a" . #'org-agenda) | 29 | :config |
30 | :config | 30 | (setq org-directory (file-truename "~/Documents/Org/")) |
31 | (setq org-directory (file-truename "~/Documents/Org/")) | 31 | (setq org-mobile-inbox-for-pull (concat org-directory "flagged.org")) |
32 | (setq org-mobile-inbox-for-pull (concat org-directory "flagged.org")) | 32 | (setq org-mobile-directory "~/Documents/Org/Mobile/") |
33 | (setq org-mobile-directory "~/Documents/Org/Mobile/") | 33 | (setq org-agenda-files '("Tasks.org" "Inbox.org" "Habits.org")) |
34 | (setq org-agenda-files '("Tasks.org" "Inbox.org" "Habits.org")) | 34 | (setq org-ellipsis " ▾") |
35 | (setq org-ellipsis " ▾") | 35 | (setq org-agenda-start-with-log-mode t) |
36 | (setq org-agenda-start-with-log-mode t) | 36 | (setq org-log-done 'time) |
37 | (setq org-log-done 'time) | 37 | (setq org-log-into-drawer t) |
38 | (setq org-log-into-drawer t) | 38 | (setq org-return-follows-link t) |
39 | (setq org-return-follows-link t) | 39 | (setq org-capture-templates |
40 | (setq org-capture-templates | 40 | `(("t" "Tasks / Projects") |
41 | `(("t" "Tasks / Projects") | 41 | ("tt" "Task" entry (file+olp "Tasks.org" "Inbox") |
42 | ("tt" "Task" entry (file+olp "Tasks.org" "Inbox") | 42 | "* TODO %?\n %t\n %a\n %i" :empty-lines 1) |
43 | "* TODO %?\n %t\n %a\n %i" :empty-lines 1) | 43 | ("tT" "Task for tomorow" entry (file+olp "Tasks.org" "Inbox") |
44 | ("tT" "Task for tomorow" entry (file+olp "Tasks.org" "Inbox") | 44 | "* TODO %?\n %t\n SCHEDULED: %(jd-emacs/org-insert-date \"+1d\")>\n %a\n %i" :empty-lines 1) |
45 | "* TODO %?\n %t\n SCHEDULED: %(jd-emacs/org-insert-date \"+1d\")>\n %a\n %i" :empty-lines 1) | 45 | |
46 | 46 | ("m" "Metrics Capture") | |
47 | ("m" "Metrics Capture") | 47 | ("mm" "Metrics" table-line (file+headline "Metrics.org" "Metrics") |
48 | ("mm" "Metrics" table-line (file+headline "Metrics.org" "Metrics") | 48 | "| %U | %^{Weight} | %^{Waist} | %^{Notes} |" :kill-buffer t) |
49 | "| %U | %^{Weight} | %^{Waist} | %^{Notes} |" :kill-buffer t) | 49 | ("sh" "School Homework" entry (file+olp "school/todo(jd-emacs/org-insert-date \"1\").org")))) |
50 | ("sh" "School Homework" entry (file+olp "school/todo(jd-emacs/org-insert-date \"1\").org")))) | 50 | |
51 | 51 | (setq org-latex-listings 'minted | |
52 | (setq org-latex-listings 'minted | 52 | org-latex-packages-alist '(("" "minted")) |
53 | org-latex-packages-alist '(("" "minted")) | 53 | org-latex-pdf-process |
54 | org-latex-pdf-process | 54 | '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" |
55 | '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" | 55 | "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")) |
56 | "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")) | 56 | (require 'org-tempo) |
57 | (require 'org-tempo) | 57 | |
58 | 58 | (defun jd/org-font-setup () | |
59 | 59 | ;; Replace list hyphen with dot | |
60 | (jd/leader-key-def | 60 | (font-lock-add-keywords 'org-mode |
61 | "o" '(:ignore t :which-key "Open/Org") | 61 | '(("^ *\\([-]\\) " |
62 | "oc" '(org-capture :which-key "Open org-capture") | 62 | (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•-")))))) |
63 | "oop" '(org-mobile-pull :which-key "Org mobile pull") | 63 | |
64 | "ooP" '(org-mobile-push :which-key "Org mobile push") | 64 | ;; Set faces for heading levels |
65 | "oa" '(org-agenda :which-key "Open org-agenda")) | 65 | (dolist (face '((org-level-1 . 1.3) |
66 | 66 | (org-level-2 . 1.2) | |
67 | 67 | (org-level-3 . 1.1) | |
68 | (defun jd/org-font-setup () | 68 | (org-level-4 . 1.0) |
69 | ;; Replace list hyphen with dot | 69 | (org-level-5 . 1.0) |
70 | (font-lock-add-keywords 'org-mode | 70 | (org-level-6 . 1.0) |
71 | '(("^ *\\([-]\\) " | 71 | (org-level-7 . 1.0) |
72 | (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•-")))))) | 72 | (org-level-8 . 1.0))) |
73 | 73 | (set-face-attribute (car face) nil :font "Terminus" :weight 'Bold :height (cdr face))) | |
74 | ;; Set faces for heading levels | 74 | |
75 | (dolist (face '((org-level-1 . 1.3) | 75 | ;; Ensure that anything that should be fixed-pitch in Org files appears that way |
76 | (org-level-2 . 1.2) | 76 | (set-face-attribute 'org-block nil :font "Terminus" :inherit 'fixed-pitch :height 100) |
77 | (org-level-3 . 1.1) | 77 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) |
78 | (org-level-4 . 1.0) | 78 | (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) |
79 | (org-level-5 . 1.0) | 79 | (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) |
80 | (org-level-6 . 1.0) | 80 | (set-face-attribute 'org-table nil :font "Terminus" :inherit '(shadow fixed-pitch)) |
81 | (org-level-7 . 1.0) | 81 | (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) |
82 | (org-level-8 . 1.0))) | 82 | (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) |
83 | (set-face-attribute (car face) nil :font "Terminus" :weight 'Bold :height (cdr face))) | 83 | (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) |
84 | 84 | (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) | |
85 | ;; Ensure that anything that should be fixed-pitch in Org files appears that way | 85 | (set-face-attribute 'line-number nil :inherit 'fixed-pitch) |
86 | (set-face-attribute 'org-block nil :font "Terminus" :inherit 'fixed-pitch :height 100) | 86 | (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) |
87 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) | 87 | |
88 | (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) | 88 | (with-eval-after-load 'org (jd/org-font-setup)) |
89 | (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) | 89 | |
90 | (set-face-attribute 'org-table nil :font "Terminus" :inherit '(shadow fixed-pitch)) | 90 | (defun jd-emacs/org-timer-stop () |
91 | (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) | 91 | (start-process-shell-command "notify-send" nil "notify-send Zakonczono odliczanie")) |
92 | (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) | 92 | |
93 | (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) | 93 | |
94 | (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) | 94 | (add-hook 'org-timer-stop-hook #'jd-emacs/org-timer-stop) |
95 | (set-face-attribute 'line-number nil :inherit 'fixed-pitch) | 95 | |
96 | (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) | 96 | (defun jd/org-tempo-setup () |
97 | 97 | (dolist (template '(("s" . "src") | |
98 | (with-eval-after-load 'org (jd/org-font-setup)) | 98 | ("sql" . "src sql") |
99 | 99 | ("sh" . "src sh") | |
100 | (defun jd-emacs/org-timer-stop () | 100 | ("el" . "src emacs-lisp") |
101 | (start-process-shell-command "notify-send" nil "notify-send Zakonczono odliczanie")) | 101 | ("li" . "src lisp") |
102 | 102 | ("sc" . "src scheme") | |
103 | 103 | ("ts" . "src typescript") | |
104 | (add-hook 'org-timer-stop-hook #'jd-emacs/org-timer-stop) | 104 | ("py" . "src python") |
105 | 105 | ("go" . "src go") | |
106 | (defun jd/org-tempo-setup () | 106 | ("yaml" . "src yaml"))) |
107 | (add-to-list 'org-structure-template-alist '("s" . "src")) | 107 | (add-to-list 'org-structure-template-alist template))) |
108 | (add-to-list 'org-structure-template-alist '("sql" . "src sql")) | 108 | |
109 | (add-to-list 'org-structure-template-alist '("sh" . "src sh")) | 109 | (with-eval-after-load 'org-tempo (jd/org-tempo-setup)) |
110 | (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) | 110 | |
111 | (add-to-list 'org-structure-template-alist '("li" . "src lisp")) | 111 | (org-babel-do-load-languages |
112 | (add-to-list 'org-structure-template-alist '("sc" . "src scheme")) | 112 | 'org-babel-load-languages |
113 | (add-to-list 'org-structure-template-alist '("ts" . "src typescript")) | 113 | '((emacs-lisp . t) |
114 | (add-to-list 'org-structure-template-alist '("py" . "src python")) | 114 | (python . t))) |
115 | (add-to-list 'org-structure-template-alist '("go" . "src go")) | 115 | |
116 | (add-to-list 'org-structure-template-alist '("yaml" . "src yaml"))) | 116 | (defun jd/org-babel-tangle-config () |
117 | 117 | (when (string-equal (file-name-directory (buffer-file-name)) | |
118 | (with-eval-after-load 'org-tempo (jd/org-tempo-setup)) | 118 | (expand-file-name "~/dotfiles/")) |
119 | 119 | ;; Dynamic scoping to the rescue | |
120 | (org-babel-do-load-languages | 120 | (let ((org-confirm-babel-evaluate nil)) |
121 | 'org-babel-load-languages | 121 | (org-babel-tangle)))) |
122 | '((emacs-lisp . t) | 122 | |
123 | (python . t))) | 123 | (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'jd/org-babel-tangle-config)))) |
124 | 124 | ||
125 | (defun jd/org-babel-tangle-config () | 125 | (use-package! org-superstar "emacs-org-superstar" |
126 | (when (string-equal (file-name-directory (buffer-file-name)) | 126 | :hook (org-mode . org-superstar-mode) |
127 | (expand-file-name "~/dotfiles/")) | 127 | :init |
128 | ;; Dynamic scoping to the rescue | 128 | (setq org-superstar-special-todo-items t) |
129 | (let ((org-confirm-babel-evaluate nil)) | 129 | (setq org-superstar-remove-leading-stars t) |
130 | (org-babel-tangle)))) | 130 | (setq org-superstar-headline-bullets-list '("◉" "○" "●" "○" "●" "○" "●"))) |
131 | 131 | ||
132 | (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'jd/org-babel-tangle-config))) | 132 | (use-package! org-roam "emacs-org-roam" |
133 | ) | 133 | :custom |
134 | 134 | (org-roam-directory (file-truename jd/org-roam-home)) | |
135 | (jd/use-package org-superstar "emacs-org-superstar" | 135 | :bind (("C-c n l" . org-roam-buffer-toggle) |
136 | :hook (org-mode . org-superstar-mode) | 136 | ("C-c n f" . org-roam-node-find) |
137 | :init | 137 | ("C-c n g" . org-roam-graph) |
138 | (setq org-superstar-special-todo-items t) | 138 | ("C-c n i" . org-roam-node-insert) |
139 | (setq org-superstar-remove-leading-stars t) | 139 | ("C-c n c" . org-roam-capture) |
140 | (setq org-superstar-headline-bullets-list '("◉" "○" "●" "○" "●" "○" "●"))) | 140 | ;; Dailies |
141 | 141 | ("C-c n j" . org-roam-dailies-capture-today)) | |
142 | (jd/use-package org-roam "emacs-org-roam" | 142 | :bind-keymap |
143 | :custom | 143 | ("C-c n d" . org-roam-dailies-map) |
144 | (org-roam-directory (file-truename jd/org-roam-home)) | 144 | :config |
145 | :bind (("C-c n l" . org-roam-buffer-toggle) | 145 | (defun jd/org-roam-filter-by-tag (tag-name) |
146 | ("C-c n f" . org-roam-node-find) | 146 | (lambda (node) |
147 | ("C-c n g" . org-roam-graph) | 147 | (member tag-name (org-roam-node-tags node)))) |
148 | ("C-c n i" . org-roam-node-insert) | 148 | |
149 | ("C-c n c" . org-roam-capture) | 149 | (defun jd/org-roam-list-notes-by-tag (tag-name) |
150 | ;; Dailies | 150 | (mapcar #'org-roam-node-file |
151 | ("C-c n j" . org-roam-dailies-capture-today)) | 151 | (seq-filter |
152 | :bind-keymap | 152 | (jd/org-roam-filter-by-tag tag-name) |
153 | ("C-c n d" . org-roam-dailies-map) | 153 | (org-roam-node-list)))) |
154 | :config | 154 | |
155 | (defun jd/org-roam-filter-by-tag (tag-name) | 155 | (defun jd/org-roam-refreshagenda-list () |
156 | (lambda (node) | 156 | (interactive) |
157 | (member tag-name (org-roam-node-tags node)))) | 157 | (setq org-agenda-files (org-roam-list-files))) |
158 | 158 | ||
159 | (defun jd/org-roam-list-notes-by-tag (tag-name) | 159 | (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) |
160 | (mapcar #'org-roam-node-file | 160 | (setq org-roam-capture-templates |
161 | (seq-filter | 161 | '(("a" "workstuff" plain (file (concat org-roam-directory "/work")) |
162 | (jd/org-roam-filter-by-tag tag-name) | 162 | :target (file+head "work/%<%Y%m%d%H%M%S>-${slug}.org" |
163 | (org-roam-node-list)))) | 163 | "#+title: ${title}\n") |
164 | 164 | :unnarrowed t) | |
165 | (defun jd/org-roam-refreshagenda-list () | 165 | ("b" "research" plain (file "~/Documents/roam/study/templates/research.org") |
166 | (interactive) | 166 | :target (file+head "study/%<%Y%m%d%H%M%S>-${slug}.org" |
167 | (setq org-agenda-files (org-roam-list-files))) | 167 | "#+title: ${title}\n") |
168 | 168 | :unnarrowed t) | |
169 | (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) | 169 | ("s" "School") |
170 | (setq org-roam-capture-templates | 170 | ("ss" "School General" plain nil |
171 | '(("a" "workstuff" plain (file (concat org-roam-directory "/work")) | 171 | :target (file+head |
172 | :target (file+head "work/%<%Y%m%d%H%M%S>-${slug}.org" | 172 | "school/%<%Y%m%d%H%M%S>-${slug}.org" |
173 | "#+title: ${title}\n") | 173 | "#+title: ${title}\n") |
174 | :unnarrowed t) | 174 | :unnarrowed t) |
175 | ("b" "research" plain (file "~/Documents/roam/study/templates/research.org") | 175 | ("sp" "Polish Lesson" plain nil |
176 | :target (file+head "study/%<%Y%m%d%H%M%S>-${slug}.org" | 176 | :target (file+head |
177 | "#+title: ${title}\n") | 177 | "school/polish/%<%Y%m%d%H%M%S>-${slug}.org" |
178 | :unnarrowed t) | 178 | "#+title: ${title}\n") |
179 | ("s" "School") | 179 | :unnarrowed t) |
180 | ("ss" "School General" plain nil | 180 | ("sw" "Wos Lesson" plain nil |
181 | :target (file+head | 181 | :target (file+head |
182 | "school/%<%Y%m%d%H%M%S>-${slug}.org" | 182 | "school/wos/%<%Y%m%d%H%M%S>-${slug}.org" |
183 | "#+title: ${title}\n") | 183 | "#+title: ${title}\n") |
184 | :unnarrowed t) | 184 | :unnarrowed t) |
185 | ("sp" "Polish Lesson" plain nil | 185 | ("g" "Guitar" plain nil |
186 | :target (file+head | 186 | :target (file+head |
187 | "school/polish/%<%Y%m%d%H%M%S>-${slug}.org" | 187 | "guitar/%<%Y%m%d%H%M%S>-${slug}.org" |
188 | "#+title: ${title}\n") | 188 | "#+title: ${title}\n") |
189 | :unnarrowed t) | 189 | :unnarrowed t) |
190 | ("sw" "Wos Lesson" plain nil | 190 | ("d" "default" plain nil |
191 | :target (file+head | 191 | :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" |
192 | "school/wos/%<%Y%m%d%H%M%S>-${slug}.org" | 192 | "#+title: ${title}\n") |
193 | "#+title: ${title}\n") | 193 | :unnarrowed t))) |
194 | :unnarrowed t) | 194 | |
195 | ("g" "Guitar" plain nil | 195 | (org-roam-db-autosync-mode)) |
196 | :target (file+head | 196 | |
197 | "guitar/%<%Y%m%d%H%M%S>-${slug}.org" | 197 | (use-package! ox-pandoc "emacs-ox-pandoc") |
198 | "#+title: ${title}\n") | ||
199 | :unnarrowed t) | ||
200 | ("d" "default" plain nil | ||
201 | :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" | ||
202 | "#+title: ${title}\n") | ||
203 | :unnarrowed t) | ||
204 | )) | ||
205 | |||
206 | (org-roam-db-autosync-mode)) | ||
207 | |||
208 | (jd/use-package ox-pandoc "emacs-ox-pandoc") | ||
209 | 198 | ||
210 | (provide 'jd-org) | 199 | (provide 'jd-org) |
211 | 200 | ||
diff --git a/.emacs.d/jd/jd-ui.el b/.emacs.d/jd/jd-ui.el index f3a39bc..ccaf369 100755 --- a/.emacs.d/jd/jd-ui.el +++ b/.emacs.d/jd/jd-ui.el | |||
@@ -29,31 +29,25 @@ | |||
29 | 29 | ||
30 | (require 'diminish) | 30 | (require 'diminish) |
31 | 31 | ||
32 | (jd/use-package doom-modeline "emacs-doom-modeline" | 32 | (use-package! doom-modeline "emacs-doom-modeline" |
33 | :config | 33 | :config |
34 | (doom-modeline-mode)) | 34 | (doom-modeline-mode)) |
35 | 35 | ||
36 | (jd/use-package solarized-theme "emacs-solarized-theme" | 36 | (use-package! solarized-theme "emacs-solarized-theme" |
37 | :config | 37 | :config |
38 | (load-theme 'solarized-dark-high-contrast t)) | 38 | (load-theme 'solarized-dark-high-contrast t)) |
39 | 39 | ||
40 | 40 | ||
41 | (jd/use-package diminish "emacs-diminish") | 41 | (use-package! diminish "emacs-diminish") |
42 | 42 | ||
43 | (jd/use-package hl-todo "emacs-hl-todo" | 43 | (use-package! hl-todo "emacs-hl-todo" |
44 | :init | 44 | :init |
45 | (setq hl-todo-keyword-faces | 45 | (setq hl-todo-keyword-faces |
46 | '(("TODO" . "#FF0000") | 46 | '(("TODO" . "#FF0000") |
47 | ("FIXME" . "#FF0000") | 47 | ("FIXME" . "#FF0000") |
48 | ("DEBUG" . "#A020F0"))) | 48 | ("DEBUG" . "#A020F0"))) |
49 | :config | 49 | :config |
50 | (global-hl-todo-mode 1)) | 50 | (global-hl-todo-mode 1)) |
51 | |||
52 | (defun jd/switch-buffer () | ||
53 | (interactive) | ||
54 | (let ((completion-regexp-list '("\\`[^*]" | ||
55 | "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*"))) | ||
56 | (call-interactively 'counsel-switch-buffer))) | ||
57 | 51 | ||
58 | (defvar jd/load-theme-hook nil) | 52 | (defvar jd/load-theme-hook nil) |
59 | (defun jd/load-theme () | 53 | (defun jd/load-theme () |
@@ -61,41 +55,29 @@ | |||
61 | (counsel-load-theme) | 55 | (counsel-load-theme) |
62 | (run-hooks 'jd/load-theme-hook)) | 56 | (run-hooks 'jd/load-theme-hook)) |
63 | 57 | ||
64 | (jd/use-package ivy "emacs-ivy" | 58 | (use-package! ivy "emacs-ivy" |
65 | :diminish | 59 | :diminish |
66 | :bind | 60 | :bind |
67 | (("C-s" . swiper)) | 61 | (("C-s" . swiper)) |
68 | :config | 62 | :config |
69 | (ivy-mode 1)) | 63 | (ivy-mode 1)) |
70 | |||
71 | (jd/use-package counsel "emacs-counsel" | ||
72 | :diminish t | ||
73 | :config | ||
74 | (counsel-mode 1) | ||
75 | 64 | ||
76 | (jd/leader-key-def | 65 | (use-package! counsel "emacs-counsel" |
77 | "t" '(:ignore t :which-key "Toggle") | 66 | :diminish t |
78 | "tT" '(toggle-truncate-lines :which-key "Toggle truncate lines") | 67 | :config |
79 | "tt" '(jd/load-theme :which-key "Choose theme")) | 68 | (counsel-mode 1)) |
80 | 69 | ||
81 | (jd/leader-key-def | 70 | (use-package! which-key "emacs-which-key" |
82 | "bb" '(jd/switch-buffer :which-key "Buffer switch") | 71 | :diminish |
83 | "ba" '(counsel-switch-buffer :which-key "Buffer switch") | 72 | :config |
84 | "b" '(:ignore t :which-key "Buffer") | 73 | (which-key-mode) |
85 | "," '(counsel-switch-buffer :which-key "Buffer switch"))) | 74 | (setq which-key-idle-delay 0.3)) |
86 | 75 | ||
87 | (jd/use-package which-key "emacs-which-key" | 76 | (use-package! all-the-icons "emacs-all-the-icons") |
88 | :diminish | ||
89 | :config | ||
90 | (which-key-mode) | ||
91 | (setq which-key-idle-delay 0.3)) | ||
92 | 77 | ||
93 | (jd/use-package all-the-icons "emacs-all-the-icons") | 78 | (use-package! beacon "emacs-beacon" |
94 | 79 | :config | |
95 | 80 | (beacon-mode 1)) | |
96 | (jd/use-package beacon "emacs-beacon" | ||
97 | :config | ||
98 | (beacon-mode 1)) | ||
99 | 81 | ||
100 | (setq display-time-string-forms | 82 | (setq display-time-string-forms |
101 | '(" " 24-hours ":" minutes " ")) | 83 | '(" " 24-hours ":" minutes " ")) |
@@ -103,7 +85,7 @@ | |||
103 | (when jd/exwm-p | 85 | (when jd/exwm-p |
104 | (display-battery-mode) | 86 | (display-battery-mode) |
105 | (display-time-mode)) | 87 | (display-time-mode)) |
106 | 88 | ||
107 | (provide 'jd-ui) | 89 | (provide 'jd-ui) |
108 | 90 | ||
109 | ;;; jd-ui.el ends here | 91 | ;;; jd-ui.el ends here |