summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-02-20 13:31:16 +0200
committerThanos Apollo <[email protected]>2024-02-20 13:31:16 +0200
commit3b422a8573bd53cca74387ac79851a2022c2e748 (patch)
treeb9d9eaf08e058cf47d9401594aebee871f70f53f /gnosis.el
parent683338fa26add3f60ae3fac579292aeed68e7f80 (diff)
Add gnosis-dashboard-mode
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 0770976..9337848 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1385,6 +1385,20 @@ review."
"e" #'gnosis-dashboard-edit-note
"q" #'quit-window)
+(define-derived-mode gnosis-dashboard-mode tabulated-list-mode "Gnosis Dashboard"
+ "Major mode for displaying Gnosis dashboard."
+ :keymap gnosis-dashboard-mode-map
+ (interactive)
+ (display-line-numbers-mode 0)
+ (setq tabulated-list-format [("Main" 30 t)
+ ("Options" 20 t)
+ ("Answer" 25 t)
+ ("Tags" 25 t)
+ ("Suspend" 5 t)])
+ (setq tabulated-list-padding 2
+ tabulated-list-sort-key nil)
+ (tabulated-list-init-header))
+
(defun gnosis-db-init ()
"Create gnosis essential directories & database."
(unless (length= (emacsql gnosis-db [:select name :from sqlite-master :where (= type table)]) 6)