summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wttrin.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/wttrin.el b/wttrin.el
index 8bce49d..13a77f1 100644
--- a/wttrin.el
+++ b/wttrin.el
@@ -122,6 +122,14 @@ Set to nil to use default font (may render as monochrome)."
:type '(choice (const :tag "Use default font" nil)
(string :tag "Font family name")))
+(defcustom wttrin-mode-line-auto-enable nil
+ "If non-nil, automatically enable mode-line weather display when loading wttrin.
+When enabled, weather for `wttrin-mode-line-favorite-location' will appear
+in the mode-line automatically. You can also manually toggle the mode-line
+display with `wttrin-mode-line-mode'."
+ :group 'wttrin
+ :type 'boolean)
+
(defcustom wttrin-debug nil
"Enable debug functions for troubleshooting wttrin behavior.
When non-nil, loads wttrin-debug.el which provides:
@@ -545,5 +553,9 @@ Weather data is fetched asynchronously to avoid blocking Emacs."
(car wttrin-default-locations)))))
(wttrin-query location))
+;; Auto-enable mode-line display if requested
+(when wttrin-mode-line-auto-enable
+ (wttrin-mode-line-mode 1))
+
(provide 'wttrin)
;;; wttrin.el ends here