Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Text startup banner. #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To update the banner or banner title
;; 'official which displays the official emacs logo
;; 'logo which displays an alternative emacs logo
;; 1, 2 or 3 which displays one of the text banners
;; "path/to/your/image.png" which displays whatever image you would prefer
;; "path/to/your/image.png" or "path/to/your/text.txt" which displays whatever image/text you would prefer

;; Content is not centered by default. To center, set
(setq dashboard-center-content t)
Expand Down
11 changes: 4 additions & 7 deletions dashboard-widgets.el
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ Example:
Default value is `official', it displays
the Emacs logo. `logo' displays Emacs alternative logo.
An integer value is the index of text
banner. A string value must be a path to a .PNG file.
banner. A string value must be a path to a .PNG or .TXT file.
If the value is nil then no banner is displayed."
:type '(choice (const :tag "offical" official)
(const :tag "logo" logo)
(string :tag "a png path"))
(string :tag "a png or txt path"))
:group 'dashboard)

(defcustom dashboard-buffer-last-width nil
Expand Down Expand Up @@ -448,13 +448,10 @@ If MESSAGEBUF is not nil then MSG is also written in message buffer."
(dashboard-get-banner-path 1)))
((integerp dashboard-startup-banner)
(dashboard-get-banner-path dashboard-startup-banner))
((and dashboard-startup-banner
(image-type-available-p (intern (file-name-extension
dashboard-startup-banner)))
(display-graphic-p))
((stringp dashboard-startup-banner)
(if (file-exists-p dashboard-startup-banner)
dashboard-startup-banner
(message "could not find banner %s" dashboard-startup-banner)
(message "could not find banner %s, use default instead" dashboard-startup-banner)
(dashboard-get-banner-path 1)))
(t (dashboard-get-banner-path 1)))))

Expand Down