emacs: auth-source: set newly introduced authinfo-hidden
[~bandali/configs] / .emacs.d / init.el
index 7c89bcd..fb7fa05 100644 (file)
@@ -490,6 +490,11 @@ For disabling the behaviour for certain buffers and/or modes."
   :custom
   ((epg-gpg-program (executable-find "gpg"))))
 
+(use-feature auth-source
+  :custom
+  (auth-sources '("~/.authinfo.gpg"))
+  (authinfo-hidden (regexp-opt '("password" "client-secret" "token"))))
+
 \f
 ;;; General bindings
 
@@ -1737,8 +1742,8 @@ This function is intended for use with `ivy-ignore-buffers'."
   :defer 0.5
   :config
   (typo-global-mode 1)
-  :hook (((text-mode erc-mode) . typo-mode)
-         (tex-mode             . (lambda ()(typo-mode -1)))))
+  :hook (((text-mode erc-mode web-mode) . typo-mode)
+         (tex-mode                      . (lambda ()(typo-mode -1)))))
 
 ;; highlight TODOs in buffers
 (use-package hl-todo
@@ -1750,16 +1755,17 @@ This function is intended for use with `ivy-ignore-buffers'."
   :defer 0.5
   :after eshell
   :config
-  (defvar user-@-host (concat (user-login-name) "@" (system-name) " "))
+  (defvar user-@-host (concat (user-login-name) "@" (system-name) ":"))
   (defun +eshell/prompt ()
-    (let ((base/dir (shrink-path-prompt default-directory)))
-      (concat (propertize user-@-host 'face 'default)
-              (propertize (car base/dir)
-                          'face 'font-lock-comment-face)
-              (propertize (cdr base/dir)
-                          'face 'font-lock-constant-face)
-              (propertize "> " 'face 'default))))
-  (setq eshell-prompt-regexp (concat user-@-host ".*> ")
+    (concat (propertize user-@-host 'face 'default)
+            (propertize (abbreviate-file-name default-directory)
+                        'face 'font-lock-comment-face)
+            (propertize "\n" 'face 'default)
+            (if (= (user-uid) 0)
+                (propertize "#" 'face 'red)
+              (propertize "$" 'face 'default))
+            (propertize " " 'face 'default)))
+  (setq eshell-prompt-regexp "\\(.*\n\\)*[$#] "
         eshell-prompt-function #'+eshell/prompt))
 
 (use-package eshell-up