diff options
-rw-r--r-- | .emacs.d/init.el | 86 |
1 files changed, 45 insertions, 41 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 047e44e..f8f37b2 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -42,8 +42,8 @@ sentence-end-double-space nil default-input-method "bulgarian-phonetic") -(define-key global-map (kbd "<escape>") 'keyboard-escape-quit) (define-key global-map (kbd "M-<backspace>") 'backward-kill-sexp) +(define-key global-map (kbd "C-c L") 'display-line-numbers-mode) (add-to-list 'load-path "~/.emacs.d/modules") @@ -124,15 +124,12 @@ (setf straight-use-package-by-default t) -;; (setf straight-recipe-overrides -;; '((transmission :type git :host nil :repo "[email protected]:/var/git/transmission") -;; (yeetube :type git :host nil :repo "[email protected]:/var/git/yeetube"))) - -(defvar thanos/custom-packages - '((yeetube :local-repo "~/Dev/emacs-lisp/yeetube") - (gnosis :local-repo "~/Dev/emacs-lisp/gnosis") - (copilot :host github :repo "zerolfx/copilot.el" :files ("dist" "*.el"))) - "Custom package recipes.") +(setf straight-recipe-overrides + '((transmission :type git :host nil :repo "[email protected]:/var/git/transmission.git") + (yeetube :type git :host nil :repo "[email protected]:/var/git/yeetube.git") + (gnosis :type git :host nil :repo "[email protected]:/var/git/gnosis.git") + (pcmpl-emerge :type git :host nil :repo "[email protected]:/var/git/pcmpl-emerge.git") + (pcmpl-rc :type git :host nil :repo "[email protected]:/var/git/pcmpl-rc.git"))) (defun theme-invisible-dividers (_theme) "Make window dividers for THEME invisible." @@ -212,6 +209,8 @@ (fg-mode-line-active "#F6F3E8") (bg-hl-line bg-dim) (cursor slate) + (prose-todo green-intense) + (prose-done bg-term-white) (fg-prompt yellow-faint) ,@modus-themes-preset-overrides-intense)) ;; Headings @@ -230,7 +229,7 @@ (vertico-mode)) (use-package marginalia - :defer t + :ensure t :hook (marginalia-mode . nerd-icons-completion-mode) :config (marginalia-mode)) @@ -280,7 +279,10 @@ ("b" . "src bash") ("q" . "QUOTE"))) :hook ((org-mode . org-auto-tangle-mode) - (org-mode . (lambda () (display-line-numbers-mode -1))))) + (org-mode . (lambda () (display-line-numbers-mode -1)))) + :bind (:map org-mode-map + (("C-c l" . org-store-link) + ("C-c M-t" . org-todo)))) (defun org-insert-book () "Insert org-link from ~/Library for book." @@ -502,7 +504,7 @@ ("C-s" . 'thanos/search) :map thanos/search ("f" . 'isearch-forward) - ("b" . 'isearch-backward) + ("r" . 'isearch-backward) ("s" . 'consult-line) ("C-f" . 'consult-find) ("C-g" . 'consult-grep) @@ -531,7 +533,9 @@ :ensure t :config (pdf-tools-install) - (add-to-list 'auto-mode-alist '("\\.pdf\\'" . 'pdf-view-mode))) + (add-to-list 'auto-mode-alist '("\\.pdf\\'" . 'pdf-view-mode)) + :hook + ((pdf-view-mode . (lambda () (display-line-numbers-mode 0))))) (use-package markdown-mode :defer t @@ -643,24 +647,11 @@ :defer t :hook ((dired-mode . nerd-icons-dired-mode))) -(use-package sudo-edit - :defer t) - -(use-package jinx +(use-package sudo-edit :defer t - :bind (:map jinx-mode-map - (("M-'" . jinx-correct))) - :hook ((org-mode . jinx-mode))) - -(use-package term - :bind (("C-c t" . term) - :map term-mode-map - ("M-p" . term-send-up) - ("M-n" . term-send-down) - :map term-raw-map - ("M-o" . other-window) - ("M-p" . term-send-up) - ("M-n" . term-send-down))) + :config + (when is-zeus + (setf sudo-edit-local-method "doas"))) (use-package dabbrev :defer t @@ -696,16 +687,34 @@ :straight (gnosis :local-repo "~/Dev/emacs-lisp/gnosis") :init (define-prefix-command 'thanos/gnosis-map) :config - ;; (require 'gnosis-test) + (setf gnosis-auto-vc-push t) :bind (("C-r" . thanos/gnosis-map) :map thanos/gnosis-map ("r" . 'gnosis-review) ("a" . 'gnosis-add-note) + ("d" . 'gnosis-add-deck) ("t" . 'gnosis-test-start))) (use-package pcomplete-yay - :straight (pcomplete-yay :local-repo "~/Dev/emacs-lisp/pcomplete-yay")) + :straight (pcomplete-yay :local-repo "~/Dev/emacs-lisp/pcomplete-yay") + :defer t) + +(use-package pcmpl-emerge + :defer t + :straight (pcmpl-emerge :local-repo "~/Dev/emacs-lisp/pcmpl-emerge")) + +(use-package pcmpl-rc + :straight (pcmpl-rc :local-repo "~/Dev/emacs-lisp/pcmpl-rc") + :defer t) +(use-package pcmpl-tailscale + :straight (pcmpl-tailscale :local-repo "~/Dev/emacs-lisp/pcmpl-taiscale") + :defer t) + +;; Emacs dev + +(use-package package-lint + :defer t) ;; AI tools (use-package gptel @@ -719,6 +728,7 @@ :straight (copilot :host github :repo "zerolfx/copilot.el" :files ("dist" "*.el")) :bind (:map copilot-mode-map ("M-TAB" . 'copilot-accept-completion-by-line) + ("C-M-<tab>" . 'copilot-accept-completion-by-word) ("C-M-n" . 'copilot-next-completion) ("C-M-p" . 'copilot-previous-completion))) @@ -742,7 +752,7 @@ ("AUTO" #'(lambda (entry) (let ((user (password-store-get-field entry "user")) (pass (password-store-get entry))) (start-process-shell-command "xdotool" nil - (format "sleep 0.3 && xdotool getactivewindow type %s && xdotool getactivewindow key Tab && xdotool getactivewindow type %s" + (format "sleep 0.3 && xdotool getactivewindow type %s && xdotool key Tab && xdotool getactivewindow type %s" (shell-quote-argument (if user user "thanosapollo")) (shell-quote-argument pass)))))) ("COPY PASS" #'password-store-copy) @@ -760,7 +770,7 @@ (use-package password-store :init (define-prefix-command 'thanos/pass) - :ensure t + :defer t :config (setf password-store-password-length (+ 20 (random 20))) :bind (("C-c p" . 'thanos/pass) @@ -771,12 +781,6 @@ ("c" . 'password-store-copy) ("s" . 'smtp-get-pass))) - -(use-package mu4e-alert - :ensure t - :config - (mu4e-alert-enable-mode-line-display)) - (use-package package-lint :defer t) |