-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tweak(tools): make
bitwarden
obsolete
- Loading branch information
1 parent
58cbde9
commit 9d35669
Showing
2 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |