diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2023-04-07 23:02:33 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2023-04-07 23:02:33 +0200 |
commit | 2b62ae597cc6a4c213f7d4b54b112ff9c216dbaa (patch) | |
tree | 4f6367dabb969d37154cadecb61c066c82f3b2ce | |
parent | 117c11fbee5b9684aa360bb0fd0321d6cadfb1aa (diff) | |
download | dotfiles-2b62ae597cc6a4c213f7d4b54b112ff9c216dbaa.tar.gz dotfiles-2b62ae597cc6a4c213f7d4b54b112ff9c216dbaa.zip |
Some changes...
-rw-r--r-- | Desktop.org | 175 | ||||
-rw-r--r-- | Emacs.org | 105 | ||||
-rw-r--r-- | Mail.org | 22 |
3 files changed, 209 insertions, 93 deletions
diff --git a/Desktop.org b/Desktop.org index e24607e..595e278 100644 --- a/Desktop.org +++ b/Desktop.org | |||
@@ -8,93 +8,92 @@ | |||
8 | 8 | ||
9 | #+begin_src emacs-lisp | 9 | #+begin_src emacs-lisp |
10 | 10 | ||
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/restart-process "polybar") | 23 | (jd-exwm/run-in-background "nitrogen --restore") |
24 | (jd-exwm/restart-process "nm-applet") | 24 | (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1") |
25 | (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") | 25 | (start-process-shell-command "syndaemon" nil "syndaemon -i 0.8 -K -R -d") |
26 | (jd-exwm/restart-process "blueman-applet") | 26 | |
27 | (jd-exwm/restart-process "pasystray")) | 27 | (jd-exwm/restart-process "polybar") |
28 | 28 | (jd-exwm/restart-process "nm-applet") | |
29 | (defun jd-exwm/exwm-update-title () | 29 | (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") |
30 | (exwm-workspace-rename-buffer exwm-title)) | 30 | (jd-exwm/restart-process "blueman-applet")) |
31 | 31 | ||
32 | (defun jd-exwm/configure-window-by-class () | 32 | (defun jd-exwm/exwm-update-title () |
33 | (interactive) | 33 | (exwm-workspace-rename-buffer exwm-title)) |
34 | (pcase exwm-class-name | 34 | |
35 | ("firefox" (exwm-workspace-move-window 2)) | 35 | (defun jd-exwm/configure-window-by-class () |
36 | ("Brave" (exwm-workspace-move-window 2)) | 36 | (interactive) |
37 | ("qutebrowser" (exwm-workspace-move-window 2)) | 37 | (pcase exwm-class-name |
38 | ("discord" (exwm-workspace-move-window 5)) | 38 | ("firefox" (exwm-workspace-move-window 2)) |
39 | ("obs" (exwm-workspace-move-window 5)) | 39 | ("Brave" (exwm-workspace-move-window 2)) |
40 | ("Virt-manager" (exwm-workspace-move-window 4)))) | 40 | ("qutebrowser" (exwm-workspace-move-window 2)) |
41 | 41 | ("discord" (exwm-workspace-move-window 5)) | |
42 | (use-package exwm | 42 | ("obs" (exwm-workspace-move-window 5)) |
43 | :config | 43 | ("Virt-manager" (exwm-workspace-move-window 4)))) |
44 | (setq exwm-workspace-number 10) | 44 | |
45 | 45 | (use-package exwm | |
46 | (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) | 46 | :config |
47 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) | 47 | (setq exwm-workspace-number 10) |
48 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) | 48 | |
49 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) | 49 | (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) |
50 | 50 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) | |
51 | (start-process-shell-command "nitrogen" nil "nitrogen --restore") | 51 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) |
52 | (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1") | 52 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) |
53 | (start-process-shell-command "xmodmap" nil "xmodmap ~/dotfiles/.Xmodmap") | 53 | |
54 | 54 | (require 'exwm-randr) | |
55 | (require 'exwm-randr) | 55 | (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) |
56 | (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) | 56 | (exwm-randr-enable) |
57 | (exwm-randr-enable) | 57 | |
58 | 58 | (setq exwm-input-simulation-keys | |
59 | (setq exwm-input-simulation-keys | 59 | '(([?\C-h] . [left]) |
60 | '(([?\C-b] . [left]) | 60 | ([?\C-l] . [right]) |
61 | ([?\C-f] . [right]) | 61 | ([?\C-k] . [up]) |
62 | ([?\C-p] . [up]) | 62 | ([?\C-j] . [down]))) |
63 | ([?\C-n] . [down]))) | 63 | |
64 | 64 | (setq exwm-input-prefix-keys | |
65 | (setq exwm-input-prefix-keys | 65 | '(?\C-x |
66 | '(?\C-x | 66 | ?\C-u |
67 | ?\C-u | 67 | ?\C-h |
68 | ?\C-h | 68 | ?\M-x |
69 | ?\M-x | 69 | ?\M-` |
70 | ?\M-` | 70 | ?\M-& |
71 | ?\M-& | 71 | ?\M-: |
72 | ?\M-: | 72 | ?\C-\M-j |
73 | ?\C-\M-j | 73 | ?\C-\ )) |
74 | ?\C-\ )) | 74 | |
75 | 75 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) | |
76 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) | 76 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) |
77 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) | 77 | |
78 | 78 | (setq exwm-input-global-keys | |
79 | (setq exwm-input-global-keys | 79 | `(([?\s-R] . exwm-reset) |
80 | `(([?\s-R] . exwm-reset) | 80 | |
81 | 81 | ||
82 | 82 | ([?\s-r] . (lambda (command) | |
83 | ([?\s-r] . (lambda (command) | 83 | (interactive (list (read-shell-command "$ "))) |
84 | (interactive (list (read-shell-command "$ "))) | 84 | (start-process-shell-command command nil command))) |
85 | (start-process-shell-command command nil command))) | 85 | |
86 | 86 | ([?\s-W] . exwm-workspace-move-window) | |
87 | ([?\s-W] . exwm-workspace-move-window) | 87 | ([?\s-w] . exwm-workspace-switch) |
88 | ([?\s-w] . exwm-workspace-switch) | 88 | |
89 | 89 | ,@(mapcar (lambda (i) | |
90 | ,@(mapcar (lambda (i) | 90 | `(,(kbd (format "s-%d" i)) . |
91 | `(,(kbd (format "s-%d" i)) . | 91 | (lambda () |
92 | (lambda () | 92 | (interactive) |
93 | (interactive) | 93 | (exwm-workspace-switch-create ,i)))) |
94 | (exwm-workspace-switch-create ,i)))) | 94 | (number-sequence 0 9)))) |
95 | (number-sequence 0 9)))) | 95 | |
96 | 96 | (exwm-enable)) | |
97 | (exwm-enable)) | ||
98 | 97 | ||
99 | #+end_src | 98 | #+end_src |
100 | ** Desktop mode | 99 | ** Desktop mode |
@@ -173,6 +172,8 @@ | |||
173 | export GTK_THEME="Adwaita:dark" | 172 | export GTK_THEME="Adwaita:dark" |
174 | export CALIBRE_USE_DARK_PALETTE=1 | 173 | export CALIBRE_USE_DARK_PALETTE=1 |
175 | 174 | ||
175 | gentoo-pipewire-launcher & | ||
176 | |||
176 | exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el | 177 | exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el |
177 | 178 | ||
178 | #+end_src | 179 | #+end_src |
@@ -29,6 +29,7 @@ | |||
29 | - [[#org-margin][Org margin]] | 29 | - [[#org-margin][Org margin]] |
30 | - [[#org-superstar][Org superstar]] | 30 | - [[#org-superstar][Org superstar]] |
31 | - [[#org-roam][Org roam]] | 31 | - [[#org-roam][Org roam]] |
32 | - [[#langtoolel][langtool.el]] | ||
32 | - [[#development][Development]] | 33 | - [[#development][Development]] |
33 | - [[#languages][Languages]] | 34 | - [[#languages][Languages]] |
34 | - [[#company][Company]] | 35 | - [[#company][Company]] |
@@ -42,6 +43,7 @@ | |||
42 | - [[#pdf-tools][PDF Tools]] | 43 | - [[#pdf-tools][PDF Tools]] |
43 | - [[#mu4e][Mu4e]] | 44 | - [[#mu4e][Mu4e]] |
44 | - [[#rss][RSS]] | 45 | - [[#rss][RSS]] |
46 | - [[#custom][Custom]] | ||
45 | - [[#runtime-performance][Runtime Performance]] | 47 | - [[#runtime-performance][Runtime Performance]] |
46 | 48 | ||
47 | * Startup Performance | 49 | * Startup Performance |
@@ -201,6 +203,8 @@ | |||
201 | 203 | ||
202 | (global-set-key (kbd "<escape>") 'keyboard-escape-quit) | 204 | (global-set-key (kbd "<escape>") 'keyboard-escape-quit) |
203 | 205 | ||
206 | (global-prettify-symbols-mode 1) | ||
207 | |||
204 | (defalias 'yes-or-no-p 'y-or-n-p) | 208 | (defalias 'yes-or-no-p 'y-or-n-p) |
205 | 209 | ||
206 | (use-package doom-themes | 210 | (use-package doom-themes |
@@ -505,14 +509,14 @@ | |||
505 | (org-level-6 . 1.1) | 509 | (org-level-6 . 1.1) |
506 | (org-level-7 . 1.1) | 510 | (org-level-7 . 1.1) |
507 | (org-level-8 . 1.1))) | 511 | (org-level-8 . 1.1))) |
508 | (set-face-attribute (car face) nil :font "Monospace" :weight 'Bold :height (cdr face))) | 512 | (set-face-attribute (car face) nil :font "sans" :weight 'Bold :height (cdr face))) |
509 | 513 | ||
510 | ;; Ensure that anything that should be fixed-pitch in Org files appears that way | 514 | ;; Ensure that anything that should be fixed-pitch in Org files appears that way |
511 | (set-face-attribute 'org-block nil :font "hack" :inherit 'fixed-pitch) | 515 | (set-face-attribute 'org-block nil :font "hack" :inherit 'fixed-pitch) |
512 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) | 516 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) |
513 | (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) | 517 | (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) |
514 | (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) | 518 | (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) |
515 | (set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch)) | 519 | (set-face-attribute 'org-table nil :font "hack ":inherit '(shadow fixed-pitch)) |
516 | (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) | 520 | (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) |
517 | (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) | 521 | (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) |
518 | (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) | 522 | (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) |
@@ -632,13 +636,51 @@ | |||
632 | :config | 636 | :config |
633 | ;; If you're using a vertical completion framework, you might want a more informative completion interface | 637 | ;; If you're using a vertical completion framework, you might want a more informative completion interface |
634 | (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) | 638 | (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) |
639 | (setq org-roam-capture-templates | ||
640 | '(("a" "workstuff" plain (file (concat org-roam-directory "/work")) | ||
641 | :target (file+head "work/%<%Y%m%d%H%M%S>-${slug}.org" | ||
642 | "#+title: ${title}\n") :unnarrowed t) | ||
643 | ("b" "research" plain (file "~/Documents/roam/study/templates/research.org") | ||
644 | :target (file+head "study/%<%Y%m%d%H%M%S>-${slug}.org" | ||
645 | "#+title: ${title}\n") :unnarrowed t) | ||
646 | )) | ||
647 | |||
635 | (org-roam-db-autosync-mode)) | 648 | (org-roam-db-autosync-mode)) |
636 | 649 | ||
637 | #+end_src | 650 | #+end_src |
638 | 651 | ||
652 | ** langtool.el | ||
653 | |||
654 | #+begin_src emacs-lisp | ||
655 | |||
656 | (use-package langtool | ||
657 | :config | ||
658 | (setq langtool-language-tool-jar "/home/jakub/Documents/LanguageTool-6.0/languagetool-commandline.jar") | ||
659 | (setq langtool-default-language "pl-PL")) | ||
660 | |||
661 | (jd/leader-key-def | ||
662 | "l" '(:ignore t :which-key "langtool") | ||
663 | "lc" 'langtool-check-buffer | ||
664 | "ld" 'langtool-check-done | ||
665 | "li" 'langtool-interactive-correction) | ||
666 | |||
667 | |||
668 | #+end_src | ||
669 | |||
639 | * Development | 670 | * Development |
640 | ** Languages | 671 | ** Languages |
641 | 672 | ||
673 | *** C | ||
674 | |||
675 | #+begin_src emacs-lisp | ||
676 | |||
677 | (setq c-default-style "linux" | ||
678 | c-basic-offset 8) | ||
679 | |||
680 | (setq gdb-many-windows t) | ||
681 | |||
682 | #+end_src | ||
683 | |||
642 | *** Lsp | 684 | *** Lsp |
643 | 685 | ||
644 | #+begin_src emacs-lisp | 686 | #+begin_src emacs-lisp |
@@ -900,9 +942,14 @@ | |||
900 | 942 | ||
901 | 943 | ||
902 | (use-package vterm | 944 | (use-package vterm |
945 | :init | ||
946 | (add-to-list 'project-switch-commands '(project-vterm "Vterm") t) | ||
947 | (add-to-list 'project-kill-buffer-conditions '(major-mode . vterm-mode)) | ||
948 | (setq vterm-copy-exclude-prompt t) | ||
903 | :config | 949 | :config |
904 | (setq vterm-buffer-name "vterm") | 950 | (setq vterm-buffer-name "vterm") |
905 | (evil-set-initial-state 'vterm-mode 'emacs)) | 951 | (evil-set-initial-state 'vterm-mode 'emacs) |
952 | (setq vterm-tramp-shells (append '(("ssh" "/bin/bash")) vterm-tramp-shells))) | ||
906 | 953 | ||
907 | #+end_src | 954 | #+end_src |
908 | 955 | ||
@@ -983,7 +1030,57 @@ | |||
983 | (use-package elfeed | 1030 | (use-package elfeed |
984 | :config | 1031 | :config |
985 | (setq elfeed-feeds | 1032 | (setq elfeed-feeds |
986 | '("https://www.reddit.com/r/emacs.rss"))) | 1033 | '(("https://www.reddit.com/r/emacs.rss" emacs) |
1034 | ("https://www.reddit.com/r/gnu.rss" gnu) | ||
1035 | ("https://stallman.org/rss/rss.xml" stallman)))) | ||
1036 | |||
1037 | #+end_src | ||
1038 | |||
1039 | * Custom | ||
1040 | |||
1041 | #+begin_src emacs-lisp | ||
1042 | (defun jd/generete-qr-from-clipboard () | ||
1043 | (interactive) | ||
1044 | (let ((clipboard-value (x-get-clipboard)) | ||
1045 | (clipboard-file-path "/tmp/clipboard_value.txt") | ||
1046 | (clipboard-out-image "/tmp/qr.png")) | ||
1047 | (with-temp-file clipboard-file-path | ||
1048 | (insert clipboard-value)) | ||
1049 | (shell-command (concat | ||
1050 | "qrencode -o " | ||
1051 | clipboard-out-image | ||
1052 | " < " | ||
1053 | clipboard-file-path)) | ||
1054 | (find-file clipboard-out-image))) | ||
1055 | |||
1056 | |||
1057 | ;; (defun jd/screenshot () | ||
1058 | ;; (inactive) | ||
1059 | ;; (let* ((screenshot-command '("import" "png:-")) | ||
1060 | ;; (image | ||
1061 | ;; (with-temp-buffer | ||
1062 | ;; (set-buffer-multibyte nil) | ||
1063 | ;; (apply #'call-process | ||
1064 | ;; (car screenshot-command) nil (current-buffer) nil | ||
1065 | ;; (cdr screenshot-command)) | ||
1066 | ;; (buffer-string)))) | ||
1067 | ;; (set-mark (point)) | ||
1068 | ;; (insert-image | ||
1069 | ;; (create-image image 'png t | ||
1070 | ;; :max-width (truncate (* (frame-pixel-width) 0.8)) | ||
1071 | ;; :max-height (truncate (* (frame-pixel-height) 0.8)) | ||
1072 | ;; :scale 1) | ||
1073 | ;; (format "<#part type=\"image/png\" disposition=inline data-encoding=base64 raw=t>\n%s\n<#/part>" | ||
1074 | ;; ;; Get a base64 version of the image -- this avoids later | ||
1075 | ;; ;; complications if we're auto-saving the buffer and | ||
1076 | ;; ;; restoring from a file. | ||
1077 | ;; (with-temp-buffer | ||
1078 | ;; (set-buffer-multibyte nil) | ||
1079 | ;; (insert image) | ||
1080 | ;; (base64-encode-region (point-min) (point-max) t) | ||
1081 | ;; (buffer-string)))) | ||
1082 | ;; (insert "\n\n") | ||
1083 | ;; (message ""))) | ||
987 | 1084 | ||
988 | #+end_src | 1085 | #+end_src |
989 | 1086 | ||
@@ -59,16 +59,34 @@ | |||
59 | smtpmail-smtp-service 465 | 59 | smtpmail-smtp-service 465 |
60 | smtpmail-stream-type 'ssl) | 60 | smtpmail-stream-type 'ssl) |
61 | 61 | ||
62 | (setq mu4e-compose-signature (concat | ||
63 | "Pozdrawiam,\n" | ||
64 | "Jakub Długosz")) | ||
65 | |||
62 | (mu4e t)) | 66 | (mu4e t)) |
63 | 67 | ||
68 | #+end_src | ||
69 | |||
70 | *mu4e-alert* | ||
71 | |||
72 | #+begin_src emacs-lisp | ||
73 | (use-package mu4e-alert | ||
74 | :defer 20 | ||
75 | :config | ||
76 | (mu4e-alert-set-default-style 'libnotify) | ||
77 | (mu4e-alert-enable-mode-line-display) | ||
78 | (mu4e-alert-enable-notifications)) | ||
79 | #+end_src | ||
80 | |||
81 | *mu4e bindings* | ||
82 | |||
83 | #+begin_src emacs-lisp | ||
64 | (jd/leader-key-def | 84 | (jd/leader-key-def |
65 | "m" '(:ignore t :which-key "mail") | 85 | "m" '(:ignore t :which-key "mail") |
66 | "mm" 'mu4e | 86 | "mm" 'mu4e |
67 | "mc" 'mu4e-compose-new) | 87 | "mc" 'mu4e-compose-new) |
68 | 88 | ||
69 | |||
70 | (provide 'jd-mu4e) | 89 | (provide 'jd-mu4e) |
71 | |||
72 | #+end_src | 90 | #+end_src |
73 | 91 | ||
74 | * mbsyncrc | 92 | * mbsyncrc |