Skip to content

Commit

Permalink
Add customization option to hide the cursor on the dashboard (emacs-d…
Browse files Browse the repository at this point in the history
…ashboard#492)

* Add customization option to hide the cursor on the dashboard

* Fix warning: reference to free variable for dashboard-hide-cursor
  • Loading branch information
cvdub authored Jan 30, 2024
1 parent c894da6 commit c1cd436
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dashboard.el
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
:group 'dashboard
:type 'hook)

(defcustom dashboard-hide-cursor nil
"Whether to hide the cursor in the dashboard."
:type 'boolean
:group 'dashboard)

(define-derived-mode dashboard-mode special-mode "Dashboard"
"Dashboard major mode for startup screen."
:group 'dashboard
Expand All @@ -91,6 +96,8 @@
(when (featurep 'display-line-numbers) (display-line-numbers-mode -1))
(when (featurep 'page-break-lines) (page-break-lines-mode 1))
(setq-local revert-buffer-function #'dashboard-refresh-buffer)
(when dashboard-hide-cursor
(setq-local cursor-type nil))
(setq inhibit-startup-screen t
buffer-read-only t
truncate-lines t))
Expand Down

0 comments on commit c1cd436

Please sign in to comment.