This commit is contained in:
Sakooooo 2024-07-14 19:39:54 +04:00
parent 532df947a8
commit 923946822d
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -1017,14 +1017,17 @@ GNU patch review metho dor sometihng idk
(setq outlook-mail-address
(string-trim (shell-command-to-string "pass mail | awk 'BEGIN {ORS=\"\"} FNR == 2{gsub(\"login: \", \"\"); gsub(/ /, \"\"); print}'")))
(defun make-proton-from-pass ()
"Proton"
(let* ((command pass "pass 'Proton Account' | awk 'BEGIN {ORS=\"\"} FNR == 2{gsub(\"login: \", \"\"); gsub(/ /, \"\"); print}'")
(output (shell-command-to-string command))
(result (concat output "@proton.me")))
result))
(defvar proton-mail-address nil)
(setq proton-mail-address (make-proton-from-pass))
(defun get-proton-mail-address-from-pass (command)
"Execute COMMAND, concatenate its output with 'hello', and store it in my-greeting."
(let ((output (shell-command-to-string command)))
;; Trim whitespace from the output
(setq output (string-trim output))
;; Concatenate 'hello' with the command output
(setq my-greeting (concat "@proton.me" output))))
(get-proton-mail-address-from-pass "pass Proton\ Account | awk 'BEGIN {ORS=\"\"} FNR == 2{gsub(\"login: \", \"\"); gsub(/ /, \"\"); print}'")
(setq mu4e-contexts
(list