diff options
Diffstat (limited to 'Emacs.org')
-rw-r--r-- | Emacs.org | 105 |
1 files changed, 101 insertions, 4 deletions
@@ -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 | ||