Skip to content

Commit

Permalink
tweak(tools): make bitwarden obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Apr 11, 2024
1 parent 58cbde9 commit 9d35669
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
15 changes: 0 additions & 15 deletions modules/me-tools.el
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,6 @@
(logview-views-file (concat minemacs-local-dir "logview-views.el"))
(logview-cache-filename (concat minemacs-cache-dir "logview-cache.el")))

(use-package bitwarden
:straight (:host github :repo "seanfarley/emacs-bitwarden")
:when (executable-find "bw")
:custom
(bitwarden-automatic-unlock
(lambda ()
(require 'auth-source)
(if-let* ((matches (auth-source-search :host "bitwarden.com" :max 1))
(entry (nth 0 matches))
(email (plist-get entry :user))
(pass (plist-get entry :secret)))
(progn (setq bitwarden-user email)
(if (functionp pass) (funcall pass) pass))
""))))

(use-package with-editor
:straight t
:hook ((shell-mode eshell-mode term-exec vterm-mode) . +with-editor-export-all)
Expand Down
30 changes: 30 additions & 0 deletions modules/obsolete/me-bitwarden.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
;;; me-bitwarden.el --- Bitwarden password manager integration into Emacs -*- lexical-binding: t; -*-

;; Copyright (C) 2022-2024 Abdelhak Bougouffa

;; Author: Abdelhak Bougouffa (rot13 "nobhtbhssn@srqbencebwrpg.bet")

;;; Commentary:

;;; Code:

(use-package bitwarden
:straight (:host github :repo "seanfarley/emacs-bitwarden")
:when (executable-find "bw")
:custom
(bitwarden-automatic-unlock
(lambda ()
(require 'auth-source)
(if-let* ((matches (auth-source-search :host "bitwarden.com" :max 1))
(entry (nth 0 matches))
(email (plist-get entry :user))
(pass (plist-get entry :secret)))
(progn (setq bitwarden-user email)
(if (functionp pass) (funcall pass) pass))
""))))


(provide 'obsolete/me-bitwarden)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; me-bitwarden.el ends here

0 comments on commit 9d35669

Please sign in to comment.