diff options
author | Thanos Apollo <[email protected]> | 2024-03-14 08:12:18 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-03-14 08:12:18 +0200 |
commit | 78e066b94809fb7746086a1ca6b7d7c39d353343 (patch) | |
tree | f28fed86811f690727dd6d8709a726edefee0d69 /gnosis.el | |
parent | fa24681514ea446f63e0c1fef5ebc67b31570ff6 (diff) |
Add gnosis-modeline-mode
Minor mode to display total due notes on modeline.
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -1745,9 +1745,27 @@ DASHBOARD-TYPE: either 'Notes' or 'Decks' to display the respective dashboard." ;; Gnosis mode ;; ;;;;;;;;;;;;;;;;; +;;;###autoload +(define-minor-mode gnosis-modeline-mode + "Minor mode for showing gnosis total due notes on modeline." + :global t + :group 'gnosis + :lighter nil + (if gnosis-modeline-mode + (progn + (add-to-list 'global-mode-string '(:eval + (format " G:%d" (length (gnosis-review-get-due-notes))))) + (force-mode-line-update)) + (setq global-mode-string + (seq-remove (lambda (item) + (and (listp item) (eq (car item) :eval) + (string-prefix-p " G:" (format "%s" (eval (cadr item)))))) + global-mode-string)) + (force-mode-line-update))) + (define-derived-mode gnosis-mode special-mode "Gnosis" "Gnosis Mode." - :interactive t + :interactive nil (read-only-mode 0) (display-line-numbers-mode 0) :lighter " gnosis-mode") |