Simple and lightweight welcome screen for Emacs.
welcome.el
just offers a function for creating a simple welcome buffer with a very
minimal dedicated major mode.
It does not register any hooks or modify Emacs startup, you should do it yourself
(see examples below).
This package is not on Melpa so can installed via git-based package manager like straight.el
:
(straight-use-package '(welcome :type git
:host github
:repo "tomrss/welcome.el"
:files ("welcome.el" "asset")))
(setq inhibit-startup-screen t)
(add-hook 'emacs-startup-hook #'welcome-screen)
Better results can be obtained integrating the visual-fill-column
package.
This snippet will start Emacs fullscreen with the Welcome screen centered:
;; start fullscreen
(setq default-frame-alist `((fullscreen . maximized)))
;; use the `visual-fill-column' package
(straight-use-package 'visual-fill-column)
(add-hook 'welcome-mode-hook
(lambda ()
;; set the width of the visual fill as the `welcome' window width
(setq visual-fill-column-width welcome-window-width)
;; center
(setq visual-fill-column-center-text t)
;; visual line
(visual-line-mode +1)
;; activate the mode
(visual-fill-column-mode +1)))
Set the the plist welcome-menu-items
as you want:
(with-eval-after-load 'welcome
(setq welcome-menu-items '(("Recent files" ; name of the entry that will be displayed
:key "f" ; key on which to binf the action
:action recentf-open ; action to execute
:icon (all-the-icons-octicon . "history")) ; icon to show
("Projects"
:key "p"
:action project-switch-project
:icon (all-the-icons-octicon . "repo"))
("Dired"
:key "d"
:action dired
:icon (all-the-icons-octicon . "file-directory"))
("Eshell"
:key "e"
:action eshell
:icon (all-the-icons-octicon . "terminal"))
("Bookmarks"
:key "b"
:action bookmark-jump
:icon (all-the-icons-octicon . "bookmark"))
("EWW browser"
:key "w"
:action eww
:icon (all-the-icons-octicon . "globe")))))
See the welcome
customization group.