diff --git a/emacs/.emacs.d/config/init-aws.el b/emacs/.emacs.d/config/init-aws.el index 2bbac74..f0514be 100644 --- a/emacs/.emacs.d/config/init-aws.el +++ b/emacs/.emacs.d/config/init-aws.el @@ -54,6 +54,15 @@ "AWS MFA failed, check *aws-mfa* buffer for details")) (process-send-string proc (concat mfa-token "\n")))) +(define-minor-mode aws-modeline-mode + "Displays the current AWS profile in the modeline." :global t + (if aws-modeline-mode + (add-to-list 'mode-line-misc-info + '(:eval (format "AWS:%s " (or aws-current-profile "default")))) + (setq mode-line-misc-info + (delete '(:eval (format "AWS:%s " (or aws-current-profile "default"))) + mode-line-misc-info)))) + ;; A dired interface to S3 (use-package s3ed :commands (s3ed-find-file