summaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2023-07-02 15:07:07 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2023-07-02 15:07:07 +0200
commit6156f86dd5797de5ea4f912b70d38963c6cf4ad4 (patch)
treed578204262209695d995e3f639076e91dcb85354 /.config
parentef565a486511cbbb86e0d1f80264b3b57d2ac88a (diff)
downloaddotfiles-6156f86dd5797de5ea4f912b70d38963c6cf4ad4.tar.gz
dotfiles-6156f86dd5797de5ea4f912b70d38963c6cf4ad4.zip
New Emacs config and change location of Emacs home dir.
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/init.el17
-rw-r--r--.config/emacs/jd-emacs/jd-emacs-apps.el88
-rw-r--r--.config/emacs/jd-emacs/jd-emacs-custom.el36
-rw-r--r--.config/emacs/jd-emacs/jd-emacs-dev.el175
-rw-r--r--.config/emacs/jd-emacs/jd-emacs-init.el81
-rw-r--r--.config/emacs/jd-emacs/jd-emacs-keys.el51
-rw-r--r--.config/emacs/jd-emacs/jd-emacs-org-mode.el200
-rw-r--r--.config/emacs/jd-emacs/jd-emacs-ui.el154
-rw-r--r--.config/emacs/jd-exwm/init.el149
-rw-r--r--.config/emacs/jd-exwm/start.sh15
-rw-r--r--.config/emacs/jd/jd-gym.el120
-rw-r--r--.config/emacs/jd/jd-mu4e.el76
12 files changed, 0 insertions, 1162 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
deleted file mode 100644
index 65a8683..0000000
--- a/.config/emacs/init.el
+++ /dev/null
@@ -1,17 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(defvar jd/exwmp (not (null (getenv "JD_EXWM")))
7 "Return non-nil if Emacs is run as a window manager.")
8
9(let ((jd-emacs-init (concat user-emacs-directory
10 "jd-emacs/jd-emacs-init.el"))
11 (jd-exwm-init (concat user-emacs-directory
12 "jd-exwm/init.el")))
13 (load jd-emacs-init)
14 (when jd/exwmp
15 (load jd-exwm-init)))
16
17;;; init.el ends here
diff --git a/.config/emacs/jd-emacs/jd-emacs-apps.el b/.config/emacs/jd-emacs/jd-emacs-apps.el
deleted file mode 100644
index 628039d..0000000
--- a/.config/emacs/jd-emacs/jd-emacs-apps.el
+++ /dev/null
@@ -1,88 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(defun jd/open-new-vterm (&optional jd/vterm-buffer-name)
7 (interactive)
8 (let ((buffer-name (generate-new-buffer-name vterm-buffer-name)))
9 (when jd/vterm-buffer-name
10 (setq buffer-name jd/vterm-buffer-name))
11 (switch-to-buffer buffer-name)
12 (vterm-mode)))
13
14
15(use-package 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
26 "ot" '(jd/open-new-vterm :which-key "Open terminal in current window"))
27
28(use-package all-the-icons-dired
29 :hook (dired-mode . all-the-icons-dired-mode))
30
31(use-package dired-ranger)
32
33(use-package dired
34 :ensure nil
35 :commands (dired dired-jump)
36 :custom ((dired-listing-switches "-agho --group-directories-first"))
37 :config
38 (evil-collection-define-key 'normal 'dired-mode-map
39 "y" 'dired-ranger-copy
40 "p" 'dired-ranger-paste
41 "X" 'dired-ranger-move
42 "h" 'dired-up-directory
43 "t" 'dired-create-empty-file
44 "T" 'dired-toggle-marks
45 "l" 'dired-find-file)
46 (setq dired-kill-when-opening-new-dired-buffer t)
47 (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer))
48
49(use-package emms
50 :config
51 (require 'emms-setup)
52 (emms-all)
53 (emms-standard)
54 (emms-default-players)
55 (emms-mode-line-disable)
56 ; (setq emms-info-functions '(emms-info-tinytag))
57 (setq emms-browser-covers 'emms-browser-cache-thumbnail-async)
58 ;; (setq emms-lyrics-dir "~/Documents/music/lyrics")
59 (emms-add-directory-tree "~/Documents/Music/"))
60
61(use-package pdf-tools)
62
63(require 'jd-mu4e)
64
65(use-package elfeed
66 :config
67 (setq elfeed-feeds
68 '(("https://www.reddit.com/r/emacs.rss" emacs)
69 ("https://www.reddit.com/r/gnu.rss" gnu)
70 ("https://stallman.org/rss/rss.xml" stallman))))
71
72(use-package langtool
73 :config
74 (setq langtool-language-tool-jar "/home/jakub/Documents/LanguageTool-6.0/languagetool-commandline.jar")
75 (setq langtool-default-language "pl-PL"))
76
77(jd/leader-key-def
78 "l" '(:ignore t :which-key "langtool")
79 "lc" 'langtool-check-buffer
80 "ld" 'langtool-check-done
81 "li" 'langtool-interactive-correction)
82
83(use-package mastodon
84 :config
85 (setq mastodon-active-user "jdlugosz963"
86 mastodon-instance-url "https://fosstodon.org/"))
87
88;;; jd-apps.el ends here
diff --git a/.config/emacs/jd-emacs/jd-emacs-custom.el b/.config/emacs/jd-emacs/jd-emacs-custom.el
deleted file mode 100644
index aef824f..0000000
--- a/.config/emacs/jd-emacs/jd-emacs-custom.el
+++ /dev/null
@@ -1,36 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
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-emacs/erc-notify-sound ()
21 (jd-exwm/run-in-background "mpv /home/jakub/.config/emacs/resources/beep.wav"))
22
23;; (add-hook 'erc-notifications-mode-hook #'jd-emacs/erc-notify-sound)
24
25(setq
26 erc-nick "bobbma"
27 erc-user-full-name "Jakub Dlugosz"
28 erc-notify-list '("akuleszaa"))
29
30;; Define a function to connect to a server
31(defun hipis-znc ()
32 (interactive)
33 (erc :server "195.74.91.18"
34 :port "6697"))
35
36;;; jd-custom.el ends here
diff --git a/.config/emacs/jd-emacs/jd-emacs-dev.el b/.config/emacs/jd-emacs/jd-emacs-dev.el
deleted file mode 100644
index 620a7ad..0000000
--- a/.config/emacs/jd-emacs/jd-emacs-dev.el
+++ /dev/null
@@ -1,175 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(setq c-default-style "linux"
7 c-basic-offset 8)
8
9(setq gdb-many-windows t)
10
11(use-package lsp-mode
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))
20
21(use-package lsp-ivy
22 :after lsp)
23
24(use-package paredit)
25(use-package evil-paredit)
26(use-package rainbow-delimiters)
27
28(defun jd/lisp-mode-setup ()
29 (rainbow-delimiters-mode)
30 (evil-paredit-mode)
31 (paredit-mode))
32
33(add-hook 'emacs-startup-hook
34 (lambda ()
35 (add-hook 'scheme-mode-hook 'jd/lisp-mode-setup)
36 (add-hook 'emacs-lisp-mode-hook 'jd/lisp-mode-setup)
37 (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup)
38 (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup)))
39
40
41(evil-define-key 'normal paredit-mode-map (kbd "g h") 'paredit-forward-barf-sexp)
42(evil-define-key 'normal paredit-mode-map (kbd "g l") 'paredit-forward-slurp-sexp)
43
44(evil-define-key 'normal paredit-mode-map (kbd "g H") 'paredit-backward-slurp-sexp)
45(evil-define-key 'normal paredit-mode-map (kbd "g L") 'paredit-backward-barf-sexp)
46
47(use-package geiser)
48(use-package geiser-guile)
49
50(defun jd/python-mode-setup ()
51 (let ((project-venv-path (concat (projectile-project-root) "venv/")))
52 (when (projectile--directory-p project-venv-path)
53 (pyvenv-activate project-venv-path)
54 (pyvenv-mode))))
55
56;; (use-package python-mode ;;TODO: find alternative
57;; :hook (python-mode . lsp-deferred)
58;; :hook (python-mode . jd/python-mode-setup)
59;; :config
60;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)))
61
62(use-package pyvenv
63 :after python-mode)
64
65(use-package typescript-mode
66 :mode ("\\.ts\\'")
67 :config
68 (setq typescript-indent-level 2))
69
70(defun jd/activate-tide-mode ()
71 (when (and (stringp buffer-file-name)
72 (string-match "\\.[tj]sx?\\'" buffer-file-name))
73 (tide-setup)
74 (tide-hl-identifier-mode)))
75
76(use-package tide
77 :after (typescript-mode company web-mode))
78
79(use-package flycheck
80 :hook ((after-init . global-flycheck-mode)))
81
82(use-package web-mode
83 :hook ((web-mode . jd/activate-tide-mode))
84 :mode
85 ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'")
86 :config
87 (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'")))
88 (setq web-mode-markup-indent-offset 2)
89 (setq web-mode-css-indent-offset 2)
90 (setq web-mode-code-indent-offset 2)
91 (setq web-mode-script-padding 2)
92 (setq web-mode-block-padding 2)
93 (setq web-mode-style-padding 2)
94 (setq web-mode-enable-auto-pairing t)
95 (setq web-mode-enable-auto-closing t)
96 (setq web-mode-enable-current-element-highlight t))
97
98(use-package yaml-mode)
99
100(use-package docker)
101
102(jd/leader-key-def
103 "d" '(:ignore t :which-key "Docker")
104 "dc" '(docker-containers :which-key "Docker containers")
105 "dd" '(docker :which-key "Docker"))
106
107(use-package company
108 :after lsp-mode
109 :hook (lsp-mode . company-mode)
110 :bind (:map company-active-map
111 ("<tab>" . company-complete-selection))
112 (:map lsp-mode-map
113 ("<tab>" . company-indent-or-complete-common))
114 :custom
115 (company-minimum-prefix-length 1)
116 (company-idle-delay 0.0)
117 :config
118 (global-company-mode))
119
120(use-package company-box
121 :hook (company-mode . company-box-mode))
122
123(use-package projectile
124 :diminish projectile-mode
125 :init
126 (when (file-directory-p "~/Documents/code")
127 (setq projectile-project-search-path '("~/Documents/code/")))
128 :custom ((projectile-Completion-system 'ivy))
129 :config
130 (setq projectile-switch-project-action #'projectile-dired)
131 (projectile-mode))
132
133(jd/leader-key-def
134 "p" '(projectile-command-map :which-key "Project")
135 "p <ESC>" '()
136 "SPC" '(projectile-find-file :which-key "Find file in project"))
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(use-package neotree
152 :init
153 (setq neo-theme 'icons)
154 :config
155
156 (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
157 (evil-define-key 'normal neotree-mode-map (kbd "C-RET") 'neotree-quick-look)
158 (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
159 (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter)
160 (evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh)
161 (evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle)
162 (evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle))
163
164(jd/leader-key-def
165 "op" '(jd/neotree-project-dir :which-key "Open neotree"))
166
167(use-package magit
168 :custom
169 (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
170
171(jd/leader-key-def
172 "g" '(:ignore t :which-key "Git")
173 "gg" '(magit-status-here :which-key "Magit status"))
174
175;;; jd-dev.el ends here
diff --git a/.config/emacs/jd-emacs/jd-emacs-init.el b/.config/emacs/jd-emacs/jd-emacs-init.el
deleted file mode 100644
index 7f80cac..0000000
--- a/.config/emacs/jd-emacs/jd-emacs-init.el
+++ /dev/null
@@ -1,81 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(defvar jd-emacs/directory
7 (concat user-emacs-directory
8 "/jd-emacs/")
9 "Path to jd-emacs config directory.")
10
11(defun jd-emacs/load (file-name)
12 "Load file from jd-emacs directory.
13FILE-NAME - file name to load."
14 (let ((file (expand-file-name (concat jd-emacs/directory
15 "jd-emacs-" file-name ".el"))))
16 (load file)))
17
18(setq gc-cons-threshold (* 2 1000 1000))
19
20
21(defun jd/display-startup-time ()
22 (message "Emacs loaded in %s with %d garbage collections."
23 (format "%.2f seconds"
24 (float-time
25 (time-subtract after-init-time before-init-time)))
26 gcs-done))
27
28
29(defun jd-emacs/startup ()
30 "This procedure will run after Emacs startup."
31 (electric-pair-mode 1)
32 (global-company-mode 1)
33 (jd/display-startup-time))
34
35(setq gc-cons-threshold (* 50 1000 1000))
36(add-hook 'emacs-startup-hook #'jd-emacs/startup)
37
38(setq user-full-name "Jakub Dlugosz"
39 user-mail-address "jdlugosz963@gmail.com")
40
41(setq backup-directory-alist '(("." . "~/.cache/emacs/backup"))
42 backup-by-copying t
43 version-control t
44 delete-old-versions t
45 kept-new-versions 20
46 kept-old-versions 5)
47
48(setq user-emacs-directory "~/.cache/emacs")
49
50(require 'package)
51(setq package-archives '(("melpa" . "https://melpa.org/packages/")
52 ("org" . "https://orgmode.org/elpa/")
53 ("gnu-devel" . "https://elpa.gnu.org/devel/")
54 ("elpa" . "https://elpa.gnu.org/packages/")))
55(package-initialize)
56
57(unless package-archive-contents
58 (package-refresh-contents))
59
60(unless (package-installed-p 'use-package)
61 (package-install 'use-package))
62
63(setq use-package-always-ensure t)
64
65(add-to-list 'load-path (expand-file-name "~/.config/emacs/jd/"))
66
67(require 'use-package)
68
69
70(jd-emacs/load "keys")
71(jd-emacs/load "ui")
72(jd-emacs/load "org-mode")
73(jd-emacs/load "dev")
74(jd-emacs/load "apps")
75(jd-emacs/load "custom")
76
77
78(setq gc-cons-threshold (* 2 1000 1000))
79
80
81;; jd-int.el ends here
diff --git a/.config/emacs/jd-emacs/jd-emacs-keys.el b/.config/emacs/jd-emacs/jd-emacs-keys.el
deleted file mode 100644
index cf7f06c..0000000
--- a/.config/emacs/jd-emacs/jd-emacs-keys.el
+++ /dev/null
@@ -1,51 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(use-package general
7 :config
8 (general-create-definer jd/leader-key-def
9 :keymaps '(normal insert visual emacs)
10 :prefix "SPC"
11 :global-prefix "C-SPC")
12
13 (general-create-definer jd/ctrl-c-keys
14 :prefix "C-c"))
15
16(use-package undo-tree
17 :diminish
18 :config
19 (setq undo-tree-auto-save-history nil)
20 (global-undo-tree-mode 1))
21
22(use-package evil
23 :init
24 (setq evil-want-integration t)
25 (setq evil-want-keybinding nil)
26 (setq evil-want-C-u-scroll t)
27 (setq evil-want-Y-yank-to-eol t)
28 (setq evil-want-C-i-jump nil)
29 (setq evil-undo-system 'undo-tree)
30 (setq evil-kill-on-visual-paste nil)
31 :config
32 (evil-set-initial-state 'exwm-mode 'emacs)
33 (evil-mode 1))
34
35(use-package evil-collection
36 :after evil
37 :config
38 (evil-collection-init))
39
40(jd/leader-key-def
41 "w" 'evil-window-map
42 "wr" '(hydra-resize-window/body :which-key "Rezize window")
43 "wd" '(evil-window-delete :which-key "Window delete"))
44
45(jd/leader-key-def
46 "ou" '(undo-tree-visualize :which-key "Open"))
47
48;; remove . key
49(define-key evil-normal-state-map (kbd ".") '())
50
51;;; jd-keys.el ends here
diff --git a/.config/emacs/jd-emacs/jd-emacs-org-mode.el b/.config/emacs/jd-emacs/jd-emacs-org-mode.el
deleted file mode 100644
index 0e5ae42..0000000
--- a/.config/emacs/jd-emacs/jd-emacs-org-mode.el
+++ /dev/null
@@ -1,200 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(defvar jd/org-home "~/Documents/Org")
7(defvar jd/org-roam-home (concat jd/org-home "/roam"))
8(defvar jd/org-roam-daily-home (concat jd/org-home "/roam/daily"))
9
10(defun jd/org-mode-init ()
11 (org-indent-mode)
12 (variable-pitch-mode 1)
13 (visual-line-mode 1))
14
15;; (defun jd-emacs/org-insert-date (&optional date)
16;; (let ((d (or date "+0d")))
17;; (org-insert-time-stamp (org-read-date nil t d)))) TODO
18
19
20(use-package org
21 :pin org
22 :commands (org-capture org-agenda)
23 :hook (org-mode . jd/org-mode-init)
24 :config
25 (setq org-directory (file-truename "~/Documents/Org/"))
26 (setq org-mobile-inbox-for-pull (concat org-directory "flagged.org"))
27 (setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")
28 (setq org-agenda-files
29 '("Tasks.org"))
30 (setq org-ellipsis " ▾")
31 (setq org-agenda-start-with-log-mode t)
32 (setq org-log-done 'time)
33 (setq org-log-into-drawer t)
34 (setq org-return-follows-link t)
35 (setq org-capture-templates
36 `(("t" "Tasks / Projects")
37 ("tt" "Task" entry (file+olp "Tasks.org" "Inbox")
38 "* TODO %?\n %t\n %a\n %i" :empty-lines 1)
39 ("tT" "Task for tomorow" entry (file+olp "Tasks.org" "Inbox")
40 "* TODO %?\n %t\n SCHEDULED: %(jd-emacs/org-insert-date \"+1d\")>\n %a\n %i" :empty-lines 1)
41
42 ("m" "Metrics Capture")
43 ("mm" "Metrics" table-line (file+headline "Metrics.org" "Metrics")
44 "| %U | %^{Weight} | %^{Waist} | %^{Notes} |" :kill-buffer t)
45 ("sh" "School Homework" entry (file+olp "school/todo(jd-emacs/org-insert-date \"1\").org"))))
46
47 (setq org-latex-listings 'minted
48 org-latex-packages-alist '(("" "minted"))
49 org-latex-pdf-process
50 '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
51 "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
52 (require 'org-tempo))
53(jd/leader-key-def
54 "o" '(:ignore t :which-key "Open/Org")
55 "oc" '(org-capture :which-key "Open org-capture")
56 "oop" '(org-mobile-pull :which-key "Org mobile pull")
57 "ooP" '(org-mobile-push :which-key "Org mobile push")
58 "oa" '(org-agenda :which-key "Open org-agenda"))
59
60(use-package evil-org
61 :after org
62 :hook (org-mode . (lambda () evil-org-mode))
63 :config
64 (require 'evil-org-agenda)
65 (evil-org-agenda-set-keys))
66
67(use-package toc-org
68 :config
69 (add-hook 'org-mode-hook 'toc-org-mode))
70
71(defun jd/org-font-setup ()
72 ;; Replace list hyphen with dot
73 (font-lock-add-keywords 'org-mode
74 '(("^ *\\([-]\\) "
75 (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•-"))))))
76
77 ;; Set faces for heading levels
78 (dolist (face '((org-level-1 . 1.3)
79 (org-level-2 . 1.2)
80 (org-level-3 . 1.1)
81 (org-level-4 . 1.0)
82 (org-level-5 . 1.0)
83 (org-level-6 . 1.0)
84 (org-level-7 . 1.0)
85 (org-level-8 . 1.0)))
86 (set-face-attribute (car face) nil :font "Terminus" :weight 'Bold :height (cdr face)))
87
88 ;; Ensure that anything that should be fixed-pitch in Org files appears that way
89 (set-face-attribute 'org-block nil :font "Terminus" :inherit 'fixed-pitch :height 100)
90 (set-face-attribute 'org-table nil :inherit 'fixed-pitch)
91 (set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
92 (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
93 (set-face-attribute 'org-table nil :font "Terminus" :inherit '(shadow fixed-pitch))
94 (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
95 (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
96 (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
97 (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
98 (set-face-attribute 'line-number nil :inherit 'fixed-pitch)
99 (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch))
100
101(with-eval-after-load 'org (jd/org-font-setup))
102
103(defun jd-emacs/org-timer-stop ()
104 (start-process-shell-command "notify-send" nil "notify-send Zakonczono odliczanie"))
105
106
107(add-hook 'org-timer-stop-hook #'jd-emacs/org-timer-stop)
108
109(defun jd/org-tempo-setup ()
110 (add-to-list 'org-structure-template-alist '("s" . "src"))
111 (add-to-list 'org-structure-template-alist '("sql" . "src sql"))
112 (add-to-list 'org-structure-template-alist '("sh" . "src sh"))
113 (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
114 (add-to-list 'org-structure-template-alist '("li" . "src lisp"))
115 (add-to-list 'org-structure-template-alist '("sc" . "src scheme"))
116 (add-to-list 'org-structure-template-alist '("ts" . "src typescript"))
117 (add-to-list 'org-structure-template-alist '("py" . "src python"))
118 (add-to-list 'org-structure-template-alist '("go" . "src go"))
119 (add-to-list 'org-structure-template-alist '("yaml" . "src yaml")))
120
121(with-eval-after-load 'org-tempo (jd/org-tempo-setup))
122
123(org-babel-do-load-languages
124 'org-babel-load-languages
125 '((emacs-lisp . t)
126 (python . t)))
127
128(defun jd/org-babel-tangle-config ()
129 (when (string-equal (file-name-directory (buffer-file-name))
130 (expand-file-name "~/dotfiles/"))
131 ;; Dynamic scoping to the rescue
132 (let ((org-confirm-babel-evaluate nil))
133 (org-babel-tangle))))
134
135(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'jd/org-babel-tangle-config)))
136
137(defun jd/org-mode-visual-fill ()
138 (setq visual-fill-column-width 100
139 visual-fill-column-center-text t)
140 (visual-fill-column-mode 1))
141
142(use-package visual-fill-column
143 :hook (org-mode . jd/org-mode-visual-fill))
144
145(use-package org-superstar
146 :hook (org-mode . org-superstar-mode)
147 :init
148 (setq org-superstar-special-todo-items t)
149 (setq org-superstar-remove-leading-stars t)
150 (setq org-superstar-headline-bullets-list '("◉" "○" "●" "○" "●" "○" "●")))
151
152(defun jd/org-roam-filter-by-tag (tag-name)
153 (lambda (node)
154 (member tag-name (org-roam-node-tags node))))
155
156(defun jd/org-roam-list-notes-by-tag (tag-name)
157 (mapcar #'org-roam-node-file
158 (seq-filter
159 (jd/org-roam-filter-by-tag tag-name)
160 (org-roam-node-list))))
161
162(defun jd/org-roam-refreshagenda-list ()
163 (interactive)
164 (setq org-agenda-files (org-roam-list-files)))
165
166(use-package org-roam
167 :custom
168 (org-roam-directory (file-truename jd/org-roam-home))
169 :bind (("C-c n l" . org-roam-buffer-toggle)
170 ("C-c n f" . org-roam-node-find)
171 ("C-c n g" . org-roam-graph)
172 ("C-c n i" . org-roam-node-insert)
173 ("C-c n c" . org-roam-capture)
174 ;; Dailies
175 ("C-c n j" . org-roam-dailies-capture-today))
176 :bind-keymap
177 ("C-c n d" . org-roam-dailies-map)
178 :config
179 ;; If you're using a vertical completion framework, you might want a more informative completion interface
180 (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
181 (setq org-roam-capture-templates
182 '(("a" "workstuff" plain (file (concat org-roam-directory "/work"))
183 :target (file+head "work/%<%Y%m%d%H%M%S>-${slug}.org"
184 "#+title: ${title}\n") :unnarrowed t)
185 ("b" "research" plain (file "~/Documents/roam/study/templates/research.org")
186 :target (file+head "study/%<%Y%m%d%H%M%S>-${slug}.org"
187 "#+title: ${title}\n") :unnarrowed t)
188 ("s" "School" plain nil
189 :target (file+head
190 "school/%<%Y%m%d%H%M%S>-${slug}.org"
191 "#+title: ${title}\n")
192 :unnarrowed t)
193 ("d" "default" plain nil
194 :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
195 "#+title: ${title}\n") :unnarrowed t)
196 ))
197
198 (org-roam-db-autosync-mode))
199
200;;; jd-emacs-org-mode.el ends here
diff --git a/.config/emacs/jd-emacs/jd-emacs-ui.el b/.config/emacs/jd-emacs/jd-emacs-ui.el
deleted file mode 100644
index c8236af..0000000
--- a/.config/emacs/jd-emacs/jd-emacs-ui.el
+++ /dev/null
@@ -1,154 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(setq inhibit-startup-message t)
7(setq visible-bell t)
8(scroll-bar-mode -1)
9(tool-bar-mode -1)
10(tooltip-mode -1)
11(menu-bar-mode -1)
12(set-fringe-mode 10)
13
14(set-face-attribute 'default nil :font "Terminus" :height 100)
15
16(add-hook 'prog-mode-hook 'menu-bar--display-line-numbers-mode-relative)
17
18(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
19
20(global-prettify-symbols-mode 1)
21
22(defalias 'yes-or-no-p 'y-or-n-p)
23
24(use-package doom-themes
25 :config
26 (load-theme 'ujelly t))
27
28(use-package diminish)
29
30(use-package hl-todo
31 :init
32 (setq hl-todo-keyword-faces
33 '(("TODO" . "#FF0000")
34 ("FIXME" . "#FF0000")
35 ("DEBUG" . "#A020F0")))
36 :config
37 (global-hl-todo-mode 1))
38
39(defun jd/switch-buffer ()
40 (interactive)
41 (let ((completion-regexp-list '("\\`[^*]"
42 "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*")))
43 (call-interactively 'counsel-switch-buffer)))
44
45(defvar jd/load-theme-hook nil)
46(defun jd/load-theme ()
47 (interactive)
48 (counsel-load-theme)
49 (run-hooks 'jd/load-theme-hook))
50
51(use-package ivy
52 :diminish
53 :bind
54 (("C-s" . swiper)
55 :map ivy-minibuffer-map
56 ("C-k" . ivy-previous-line)
57 ("C-j" . ivy-next-line)
58 :map ivy-switch-buffer-map
59 ("C-k" . ivy-previous-line))
60 :config
61 (ivy-mode 1))
62
63(use-package counsel
64 :config
65 (counsel-mode 1))
66
67(jd/leader-key-def
68 "t" '(:ignore t :which-key "Toggle")
69 "tT" '(toggle-truncate-lines :which-key "Toggle truncate lines")
70 "tt" '(jd/load-theme :which-key "Choose theme"))
71
72(jd/leader-key-def
73 "bb" '(jd/switch-buffer :which-key "Buffer switch")
74 "ba" '(counsel-switch-buffer :which-key "Buffer switch")
75 "b" '(:ignore t :which-key "Buffer")
76 "," '(counsel-switch-buffer :which-key "Buffer switch"))
77
78(use-package which-key
79 :diminish
80 :config
81 (which-key-mode)
82 (setq which-key-idle-delay 0.3))
83
84(use-package all-the-icons)
85
86(use-package doom-modeline
87 ; :init (doom-modeline-mode 0)
88 :custom ((doom-modeline-height 15)))
89
90(use-package hydra
91 :defer t)
92
93(defun jd/text-scale-increase ()
94 (interactive)
95 (let ((old-face-attribute (face-attribute 'default :height)))
96 (set-face-attribute 'default nil :height (+ old-face-attribute 10))))
97
98(defun jd/text-scale-decrease ()
99 (interactive)
100 (let ((old-face-attribute (face-attribute 'default :height)))
101 (set-face-attribute 'default nil :height (- old-face-attribute 10))))
102
103(defhydra hydra-resize-window (:timeout 4)
104 ("h" evil-window-decrease-width "<")
105 ("l" evil-window-increase-width ">")
106 ("k" evil-window-decrease-height "^")
107 ("j" evil-window-increase-height "v")
108 ("q" nil "finished" :exit t))
109
110(defhydra hydra-text-scale-global (:timeout 4)
111 "scale text"
112 ("j" jd/text-scale-increase "in")
113 ("k" jd/text-scale-decrease "out")
114 ("q" nil "finished" :exit t))
115
116(defhydra hydra-text-scale (:timeout 4)
117 "scale text"
118 ("j" text-scale-increase "in")
119 ("k" text-scale-decrease "out")
120 ("q" nil "finished" :exit t))
121
122(jd/leader-key-def
123 "tS" '(hydra-text-scale-global/body :which-key "Scale text")
124 "ts" '(hydra-text-scale/body :which-key "Scale text"))
125
126(use-package beacon
127 :config
128 (beacon-mode 1))
129
130(jd/leader-key-def
131 "f" '(:ignore t :which-key "Files")
132 "fs" '(save-buffer :which-key "File save")
133 "." '(find-file :which-key "Find file")
134 "ff" '(find-file :which-key "Find file"))
135
136(jd/leader-key-def
137 "e" '(:ignore t :which-key "Eval")
138 "eb" '(eval-buffer :which-key "Eval buffer")
139 "ee" '(eval-defun :which-key "Eval defun"))
140
141(jd/leader-key-def
142 :keymaps '(visual)
143 "er" '(eval-region :which-key "Eval region"))
144
145(defun jd/kill-other-buffers ()
146 (interactive)
147 (mapc 'kill-buffer (cdr (buffer-list (current-buffer)))))
148
149(jd/leader-key-def
150 "bK" '(jd/kill-other-buffers :which-key "Kill other buffers")
151 "bk" '(kill-current-buffer :which-key "Kill buffer")
152 "bB" '(ibuffer :which-key "Open ibuffer"))
153
154;;; jd-ui.el ends here
diff --git a/.config/emacs/jd-exwm/init.el b/.config/emacs/jd-exwm/init.el
deleted file mode 100644
index cf043fb..0000000
--- a/.config/emacs/jd-exwm/init.el
+++ /dev/null
@@ -1,149 +0,0 @@
1(defun jd/exwm-update-class ()
2 (exwm-workspace-rename-buffer exwm-class-name))
3
4 (defun jd-exwm/run-in-background (command)
5 (let ((command-parts (split-string command "[ ]+")))
6 (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
7
8 (defun jd-exwm/restart-process (program-name)
9 (call-process "killall" nil nil nil program-name)
10 (jd-exwm/run-in-background program-name))
11
12 (defun jd-exwm/exwm-init-hook ()
13 (jd-exwm/run-in-background "nitrogen --restore")
14 (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1")
15(start-process-shell-command "syndaemon" nil "syndaemon -i 0.8 -K -R -d")
16
17 (jd-exwm/restart-process "polybar")
18 (jd-exwm/restart-process "nm-applet")
19 (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6")
20 (jd-exwm/restart-process "blueman-applet"))
21
22 (defun jd-exwm/exwm-update-title ()
23 (exwm-workspace-rename-buffer exwm-title))
24
25 (defun jd-exwm/configure-window-by-class ()
26 (interactive)
27 (pcase exwm-class-name
28 ("firefox" (exwm-workspace-move-window 2))
29 ("Brave" (exwm-workspace-move-window 2))
30 ("qutebrowser" (exwm-workspace-move-window 2))
31 ("discord" (exwm-workspace-move-window 5))
32 ("obs" (exwm-workspace-move-window 5))
33 ("Virt-manager" (exwm-workspace-move-window 4))))
34
35 (use-package exwm
36 :config
37 (setq exwm-workspace-number 10)
38
39 (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook)
40 (add-hook 'exwm-update-class-hook #'jd/exwm-update-class)
41 (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title)
42 (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class)
43
44 (require 'exwm-randr)
45 (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1"))
46 (exwm-randr-enable)
47
48 (setq exwm-input-simulation-keys
49 '(([?\C-h] . [left])
50 ([?\C-l] . [right])
51 ([?\C-k] . [up])
52 ([?\C-j] . [down])))
53
54 (setq exwm-input-prefix-keys
55 '(?\C-x
56 ?\C-u
57 ?\C-h
58 ?\M-x
59 ?\M-`
60 ?\M-&
61 ?\M-:
62 ?\C-\M-j
63 ?\C-\ ))
64
65 (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
66 (exwm-input-set-key (kbd "s-p") 'counsel-linux-app)
67
68 (setq exwm-input-global-keys
69 `(([?\s-R] . exwm-reset)
70
71
72 ([?\s-r] . (lambda (command)
73 (interactive (list (read-shell-command "$ ")))
74 (start-process-shell-command command nil command)))
75
76 ([?\s-W] . exwm-workspace-move-window)
77 ([?\s-w] . exwm-workspace-switch)
78
79 ,@(mapcar (lambda (i)
80 `(,(kbd (format "s-%d" i)) .
81 (lambda ()
82 (interactive)
83 (exwm-workspace-switch-create ,i))))
84 (number-sequence 0 9))))
85
86 (exwm-enable))
87
88(use-package desktop-environment
89 :after exwm
90 :config (desktop-environment-mode)
91 :custom
92 (desktop-environment-brightness-small-increment "2%+")
93 (desktop-environment-brightness-small-decrement "2%-")
94 (desktop-environment-brightness-normal-increment "5%+")
95 (desktop-environment-brightness-normal-decrement "5%-"))
96
97(set-frame-parameter (selected-frame) 'alpha '(90 . 90))
98(add-to-list 'default-frame-alist `(alpha . (90 . 90)))
99(set-frame-parameter (selected-frame) 'fullscreen 'maximized)
100(add-to-list 'default-frame-alist '(fullscreen . maximized))
101
102(defun jd-exwm/get-color (ATTRIBUTE)
103 (face-attribute 'default ATTRIBUTE))
104
105(defun theme-to-xresources ()
106 (interactive)
107 (require 'term)
108 (with-temp-buffer
109 (insert "! Generated by theme-to-xresources\n")
110 (dolist (spec
111 '(("emacs.background" :background "E6")
112 ("emacs.foreground" :foreground "")))
113 (let ((color (jd-exwm/get-color (cadr spec))))
114 (insert (format "%s: #%s%s\n"
115 (car spec)
116 (caddr spec)
117 (string-remove-prefix "#" color))))
118 (write-region (point-min) (point-max) "~/.Xresources")))
119 (call-process "xrdb" nil nil nil "-merge" (expand-file-name "~/.Xresources")))
120
121(defun jd/theme-sync ()
122 (interactive)
123 (theme-to-xresources)
124 (setq org-confirm-babel-evaluate nil)
125 (org-babel-tangle-file "~/dotfiles/Desktop.org")
126 (setq org-confirm-babel-evaluate 't)
127 (call-process "killall" nil nil nil "dunst") ;; TODO: prevent clear notification history
128 (jd-exwm/restart-process "polybar"))
129
130(add-hook 'jd/load-theme-hook #'jd/theme-sync)
131(add-hook 'exwm-init-hook #'jd/theme-sync)
132
133(defun jd/dunst-show-history ()
134 (interactive)
135 (start-process-shell-command "dunstctl" nil "dunstctl history-pop"))
136
137(defun jd/dunst-close ()
138 (interactive)
139 (start-process-shell-command "dunstctl" nil "dunstctl close"))
140
141(defun jd/dunst-close-all ()
142 (interactive)
143 (start-process-shell-command "dunstctl" nil "dunstctl close-all"))
144
145(jd/leader-key-def
146 "d" '(nil :which-key "dunst")
147 "dh" '(jd/dunst-show-history :which-key "show history")
148 "dc" '(jd/dunst-close :which-key "close")
149 "da" '(jd/dunst-close-all :which-key "close all"))
diff --git a/.config/emacs/jd-exwm/start.sh b/.config/emacs/jd-exwm/start.sh
deleted file mode 100644
index 98149b6..0000000
--- a/.config/emacs/jd-exwm/start.sh
+++ /dev/null
@@ -1,15 +0,0 @@
1#!/bin/sh
2
3# picom &
4
5xss-lock -- slock &
6
7export VISUAL="emacsclient -a vim"
8export EDITOR="$VISUAL"
9export GTK_THEME="Adwaita:dark"
10export CALIBRE_USE_DARK_PALETTE=1
11export JD_EXWM=1
12
13gentoo-pipewire-launcher &
14
15exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el
diff --git a/.config/emacs/jd/jd-gym.el b/.config/emacs/jd/jd-gym.el
deleted file mode 100644
index 2602e3e..0000000
--- a/.config/emacs/jd/jd-gym.el
+++ /dev/null
@@ -1,120 +0,0 @@
1;;; jd-gym.el --- Gym workout manager.
2;;; Commentary:
3;; It will be a gym workout manager in the future.
4;;; code:
5
6(require 'emacsql-sqlite)
7
8(defconst jd-gym/db--tables-schema
9 '((workout-plans
10 [(id integer :primary-key :autoincrement)
11 (name text)])
12
13 (workouts
14 [(id integer :primary-key :autoincrement)
15 (workout-plan-id integer :not-null)
16 (day integer :not-null)
17 (month integer :not-null)
18 (year integer :not-null)]
19 (:foreign-key [workout-plan-id] :references workout-plans [id] :on-delete :cascade))
20
21 (muscle-part
22 [(id integer :primary-key :autoincrement)
23 (name text :not-null)])
24
25 (exercises
26 [(id integer :primary-key :autoincrement)
27 (name text :not-null)
28 (muscle-part-id integer :not-null)]
29 (:foreign-key [muscle-part-id] :references muscle-part [id] :on-delete :cascade))
30
31 (workout-plan-exercise-map
32 [(id integer :primary-key :autoincrement)
33 (week-day integer :not-null)
34 (workout-plan-id integer :not-null)
35 (exercise-id integer :not-null)]
36 (:foreign-key [workout-plan-id] :references workout-plans [id] :on-delete :cascade)
37 (:foreign-key [exercise-id] :references exercises [id] :on-delete :cascade))
38
39 (workout-sets
40 [(id integer :primary-key :autoincrement)
41 (reps integer :not-null)
42 (weight integer :not-null)
43 (workout-plan-exercise-map-id integer :not-null)
44 (comment text)]
45 (:foreign-key [workout-plan-exercise-map-id] :references workout-plan-exercise-map [id] :on-delete :cascade))))
46
47(defconst jd-gym/db--test-data
48 '((workout-plans
49 ([nil "Push pull"]))
50 (workouts
51 ([nil 1 3 1 2023]))
52 (muscle-part
53 ([nil "glutes"]
54 [nil "chest"]))
55 (exercises
56 ([nil "Bench press" 2]
57 [nil "RDL" 1]))
58 (workout-plan-exercise-map
59 ([nil 0 1 1] ; Monday, Push pull, Bench press
60 [nil 1 1 2] ; Tuesday, Push pull, RDL
61 [nil 3 1 1] ; Thursday, Push pull, Bench press
62 [nil 4 1 2] ; Friday, Push pull, RDL
63 ))
64 (workout-sets
65 ([nil 7 70 1 "New PR!"]
66 [nil 8 110 2 "It was hard!"]))))
67
68(defun jd-gym/db--test-data-insert ()
69 "Insert test data to jd-gym database."
70 (mapc (lambda (table)
71 (let ((table-name (car table))
72 (table-data (cdr table)))
73 (emacsql jd-gym/db--conn [:insert :into $i1
74 :values $v2]
75 table-name table-data)))
76 jd-gym/db--test-data))
77
78(defvar jd-gym/db-path "~/Documents/Gym/gym.sqlite"
79 "Path can be relative or absolute.")
80
81(defvar jd-gym/db--conn nil
82 "Store connection to jd-gym database.")
83
84(defun jd-gym/db--conn-p ()
85 "Check if jd-gym is connected to db."
86 (and (emacsql-sqlite-connection-p jd-gym/db--conn)
87 (emacsql-live-p jd-gym/db--conn)))
88
89(defun jd-gym/db--connect ()
90 "Connect to db if there is no connection yet."
91 (unless (jd-gym/db--conn-p)
92 (setq jd-gym/db--conn (emacsql-sqlite jd-gym/db-path))))
93
94(defun jd-gym/db--close ()
95 "Close db connection."
96 (when (jd-gym/db--conn-p)
97 (emacsql-close jd-gym/db--conn)))
98
99(defun jd-gym/db--init ()
100 "Initialize database structure."
101 (when (jd-gym/db--conn-p)
102 (emacsql jd-gym/db--conn [:pragma (= foreign_keys ON)])
103 (emacsql jd-gym/db--conn "PRAGMA foreign_keys=ON")
104 (mapc (lambda (table)
105 (let ((table-name (car table))
106 (table-schema (cdr table)))
107 (emacsql jd-gym/db--conn [:create-table $i1 $S2] table-name table-schema)))
108 jd-gym/db--tables-schema)))
109
110(defun jd-gym/db ()
111 "Entrypoint to jd-gym db."
112 (unless (file-exists-p jd-gym/db-path)
113 (jd-gym/db--close)
114 (jd-gym/db--connect) ; Restart connection
115 (jd-gym/db--init)))
116
117
118(provide 'jd-gym)
119
120;;; jd-gym.el ends here
diff --git a/.config/emacs/jd/jd-mu4e.el b/.config/emacs/jd/jd-mu4e.el
deleted file mode 100644
index 0f45f15..0000000
--- a/.config/emacs/jd/jd-mu4e.el
+++ /dev/null
@@ -1,76 +0,0 @@
1(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
2
3(use-package org-msg)
4
5(use-package mu4e
6 :defer 10
7 :ensure nil
8 :config
9 (require 'org-mu4e)
10
11 (setq mu4e-mu-binary "/usr/local/bin/mu")
12 (setq mu4e-update-interval (* 10 60))
13 (setq mu4e-get-mail-command "mbsync -a")
14 (setq mu4e-maildir "~/Mail")
15
16 (setq mu4e-completing-read-function #'ivy-completing-read)
17
18 (setq mu4e-change-filenames-when-moving t)
19
20 (setq mu4e-contexts
21 `(,(make-mu4e-context
22 :name "Abaks"
23 :match-func (lambda (msg) (when msg
24 (string-prefix-p "/abaks" (mu4e-message-field msg :maildir))))
25 :vars '(
26 (user-full-name . "Jakub Dlugosz")
27 (user-mail-address . "jakub@abaks.pl")
28 (mu4e-sent-folder . "/abaks/Sent Items")
29 (mu4e-trash-folder . "/abaks/Trash")
30 (mu4e-drafts-folder . "/abaks/Drafts")
31 (mu4e-refile-folder . "/abaks/Archive")
32 (smtpmail-local-domain . "pl")
33 (smtpmail-smtp-server . "smtp.abaks.pl")
34 (mu4e-sent-messages-behavior . sent)
35 ))
36 ,(make-mu4e-context
37 :name "Gmail"
38 :match-func (lambda (msg) (when msg
39 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
40 :vars '(
41 (user-full-name . "Jakub Dlugosz")
42 (user-mail-address . "jdlugosz963@gmail.com")
43 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane")
44 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz")
45 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze")
46 (mu4e-refile-folder . "/gmail/Archive")
47 (smtpmail-local-domain . "com")
48 (smtpmail-smtp-server . "smtp.gmail.com")
49 (mu4e-sent-messages-behavior . sent)
50 ))))
51
52 (setq mail-user-agent 'mu4e-user-agent
53 mail-host-address nil
54 message-send-mail-function 'smtpmail-send-it
55 smtpmail-smtp-service 465
56 smtpmail-stream-type 'ssl)
57
58 (setq mu4e-compose-signature (concat
59 "Pozdrawiam,\n"
60 "Jakub Długosz"))
61
62 (mu4e t))
63
64(use-package mu4e-alert
65 :defer 20
66 :config
67 (mu4e-alert-set-default-style 'libnotify)
68 (mu4e-alert-enable-mode-line-display)
69 (mu4e-alert-enable-notifications))
70
71(jd/leader-key-def
72 "m" '(:ignore t :which-key "mail")
73 "mm" 'mu4e
74 "mc" 'mu4e-compose-new)
75
76(provide 'jd-mu4e)