diff options
author | Thanos Apollo <[email protected]> | 2024-11-11 19:20:01 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-11-11 19:20:01 +0200 |
commit | 8f8747be8e40552dde0fe2e52fb15b4fb325d773 (patch) | |
tree | ac77636c78759493684636717456bce9930553a3 /.config/emacs/init.el | |
parent | 30131a4c110a0d9c66bd601327235cde60fbbf61 (diff) |
emacs: Refactor passwrod-store & remove jabber
Diffstat (limited to '.config/emacs/init.el')
-rw-r--r-- | .config/emacs/init.el | 69 |
1 files changed, 15 insertions, 54 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 70d1c89..1b26af5 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -801,44 +801,21 @@ rss.xml" anna piracy) (eshell-git-prompt-use-theme 'multiline)) -;; Chat -(use-package jabber - :vc (:url "https://codeberg.org/emacs-jabber/emacs-jabber") - :ensure t +;; Password-store +(use-package password-store + :init (define-prefix-command 'thanos/pass) + :defer t :config - (defun jabber-buffers-formats (&optional buffer-formats) - "Return jabber BUFFER-FORMATS without the format specifiers. - -By default, returns all jabber related buffers format." - (let ((buffer-formats (or buffer-formats '(jabber-chat-buffer-format - jabber-browse-buffer-format - jabber-roster-buffer - jabber-groupchat-buffer-format - jabber-muc-private-buffer-format)))) - (cl-loop for var in buffer-formats - for str = (symbol-value var) - for formatted-str = (when (stringp str) - ;; Remove format specifier and - ;; the following 2 char, or 1 if - ;; there is not second. - (replace-regexp-in-string "%.?" "" str)) - collect formatted-str))) - - (defun jabber-switch-to-buffer () - "Prompt the user to select a buffer whose name matches a list of strings." - (interactive) - (let* ((string-list (jabber-buffers-formats)) - (buffers-matching-strings - (cl-loop for buf in (buffer-list) - when (cl-loop for str in string-list - thereis (string-match-p str (buffer-name buf))) - collect (buffer-name buf)))) - (if buffers-matching-strings - (switch-to-buffer - (completing-read "Select jabber buffer: " buffers-matching-strings))) - (error "No jabber buffer found"))) - :bind (:map jabber-global-keymap - ("C-b" . 'jabber-switch-to-buffer))) + (setf password-store-password-length (+ 20 (random 20))) + :bind (("C-c p" . 'thanos/pass) + :map thanos/pass + ("i" . 'password-store-insert) + ("e" . 'password-store-edit) + ("g" . 'password-store-generate) + ("c" . 'password-store-copy) + ("s" . 'smtp-get-pass))) + +;; Chat (use-package erc :ensure t @@ -1003,22 +980,6 @@ By default, returns all jabber related buffers format." :map gptel-mode-map ("C-c h" . 'gptel-menu))) - -;; Password-store -(use-package password-store - :init (define-prefix-command 'thanos/pass) - :defer t - :config - (setf password-store-password-length (+ 20 (random 20))) - - :bind (("C-c p" . 'thanos/pass) - :map thanos/pass - ("i" . 'password-store-insert) - ("e" . 'password-store-edit) - ("g" . 'password-store-generate) - ("c" . 'password-store-copy) - ("s" . 'smtp-get-pass))) - (use-package package-lint :defer t) @@ -1053,7 +1014,7 @@ By default, returns all jabber related buffers format." (kill-buffer (process-buffer process)))))))) (use-package notmuch - :ensure t + :defer t :bind (("C-x m" . notmuch-hello) :map notmuch-hello-mode-map ("u" . notmuch-hello-update) |