diff options
author | Thanos Apollo <[email protected]> | 2024-08-03 18:45:36 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-08-03 18:45:36 +0300 |
commit | cd8f3d5a382e1c7b72f51255408a1a4d32dcf907 (patch) | |
tree | fbdc6f70b620c06fdb6bf4428659226595b4ad0e | |
parent | bcfc148fa9308d4f3df89cd17fbb9ae45989c2b3 (diff) |
New function: Add dashboard-return.
* Returns to dashboard, refreshing for current values.
-rw-r--r-- | gnosis-dashboard.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el index 9b7f4c8..528c570 100644 --- a/gnosis-dashboard.el +++ b/gnosis-dashboard.el @@ -67,6 +67,19 @@ '((t :foreground "#ff0a6a" :weight bold)) "My custom face for both light and dark backgrounds.") +(defun gnosis-dashboard-return (&optional current-values) + "Return to dashboard for CURRENT-VALUES." + (interactive) + (let* ((current-values (or current-values gnosis-dashboard--current)) + (type (plist-get current-values :type)) + (ids (plist-get current-values :ids))) + (cond ((eq type 'notes) + (gnosis-dashboard-output-notes ids)) + ((eq type 'decks ) + (gnosis-dashboard-output-decks)) + ((eq type 'tags ) + (gnosis-dashboard-output-tags))))) + (defun gnosis-dashboard-generate-dates (&optional year) "Return a list of all dates (year month day) for YEAR." (let* ((current-year (or (decoded-time-year (decode-time)) year)) |