emacs-dashboard icon indicating copy to clipboard operation
emacs-dashboard copied to clipboard

Customisation is difficult

Open jwintz opened this issue 8 years ago • 13 comments

Hello,

First of all, great package ! I'm now using it on a daily basis.

As a fan of spacemacs but reticent to vim bindings, I use spacemacs-theme and spaceline packages, emacs-dashboard just completed the collection.

However, I cloned it and integrated it into my emacs init system, since it is not as customisable as I wanted.

First, the banner cannot be changed.

Second, it is hard to add sections like workspaces as far as perp-mode is concerned, or builtin info documents like the excellent "Introduction to Emacs Lisp".

I have done it here: https://github.com/jwintz/prolusion/blob/master/prolusion-core/prolusion-dashboard.el, keeping credits of course.

My implementation relies on conventions, but it would be great to incorporate it at some time.

  • ju

jwintz avatar Dec 12 '16 22:12 jwintz

Hey @jwintz,

Nice work! I would love to have your new widgets into this repo. Could you be so kind and push your new stuff into a PR? I was actually planning to have a go at some new stuff during holidays but since you've already done some i would be open to work with you to get them integrated.

Thanks

rakanalh avatar Dec 12 '16 23:12 rakanalh

Thanks for your prompt answer,

Of course I will ! Some renaming to do, but it’ll be fine.

I’ll PR your soon ! Maybe tomorrow !

  • ju

On 13 Dec 2016, at 00:14, Rakan Alhneiti [email protected] wrote:

Hey @jwintz https://github.com/jwintz,

Nice work! I would love to have your new widgets into this repo. Could you be so kind and push your new stuff into a PR? I was actually planning to have a go at some new stuff during holidays but since you've already done some i would be open to work with you to get them integrated.

Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rakanalh/emacs-dashboard/issues/26#issuecomment-266584286, or mute the thread https://github.com/notifications/unsubscribe-auth/ADIA_pwI9zanK1zfMypwTEZy9apBQUYzks5rHdVjgaJpZM4LLG82.

jwintz avatar Dec 12 '16 23:12 jwintz

Hi @jwintz,

I am currently working on many enhancements for Dashboard on the widgets branch. You might be interested to have a look at whats coming. I was also looking at your customizations, still interested in adding your customizations?

rakanalh avatar Dec 28 '16 21:12 rakanalh

PR: https://github.com/rakanalh/emacs-dashboard/pull/29

rakanalh avatar Dec 28 '16 21:12 rakanalh

Yes ! Great work, love the resizing feature. As for the widgets, I've added the following:

  • integration of persp-mode.el: based on a save-directory-dir variable, globs (using f.el) all files containing the *workspace* pattern
  • info documents: based on a info-directory-dir variable, globs (using f.el) all info files in the directory

However, this is not very generic so far, and tweaked towards my very own emacs setup. I'm thinking of a way to make it more generic in order to submit a PR.

Also, I've integrated version information and used font-awesome. Again, I've specified font faces that match both light and dark versions of my theme, but it is easy to use font-lock faces instead . Here's how it looks:

screen shot 2016-12-29 at 13 18 17

jwintz avatar Dec 29 '16 12:12 jwintz

Nice! i'll try to steal some things off your codebase then :)

rakanalh avatar Dec 29 '16 18:12 rakanalh

Just discovered dashboard today - very, very nice! I've started using it, replacing what I've been using and now I wanted to customize it a bit to add some ideas I've been using in my emacs startup. (Basically I put a random 'fortune' in my scratch buffer, and display a "tip of the day" which just shows the help page for a random emacs command (to remind me of them and learn more of what's in this great editor.) So I started by trying to just add the custom widget from the dashboard doc that would just (insert "custom text"):

(defun dashboard-insert-custom () (insert "Custom text")) (add-to-list 'dashboard-item-generators '(custom . dashboard-insert-custom)) (add-to-list 'dashboard-items '(custom) t)

  • but when emacs starts now I get

Lisp error: (wrong-number-of-arguments (lambda nil (insert "Custom text")) 1) dashboard-insert-custom(20) dashboard-insert-startupify-lists()

I figure if I can get the basic idea working, I can enhance it to make my 'widgets'. I haven't dug into the dashboard code yet, but I was wondering if someone might offer some advice as to what I might be doing wrong. :)

rgd avatar Aug 09 '17 02:08 rgd

Ah - got it. Looking at the dashboard-insert-recents and similar functions helped. Had to add a parameter to my defun:

(defun dashboard-insert-custom(list-size) ...)

Might want to update the documentation for that. Now off to add my own widgets!

rgd avatar Aug 09 '17 03:08 rgd

And now I have my "fortune" and "tip of the day" widgets working nicely! Thank you!

image

rgd avatar Aug 09 '17 18:08 rgd

Hi @rgd

Looking great. Thanks for the update.

Feel free to contribute the tip of the day widget, i am interested in including it in dashboard.

rakanalh avatar Aug 09 '17 18:08 rakanalh

My tip of the day is based on : https://www.emacswiki.org/emacs/TipOfTheDay from Dave Pearson. It picks a random command and displays the documentation for it and any keybindings. Helps remind me of things I knew or helps me learn new things already there. (Not used to putting code in for a pull request yet, so I'll just copy it here.)

(defun totd() (let* ((commands (loop for s being the symbols when (commandp s) collect s)) (command (nth (random (length commands)) commands))) (insert (format "** Tip of the day: ** \nCommand: %s\n\n%s\n\nInvoke with:\n\n" (symbol-value 'command) (documentation command) ) ) (where-is command t) ) )

(defun dashboard-insert-totd (list-size) (totd)) (add-to-list 'dashboard-item-generators '(totd . dashboard-insert-totd)) (add-to-list 'dashboard-items '(totd . 1) t) `

rgd avatar Aug 09 '17 23:08 rgd

Yes ! Great work, love the resizing feature. As for the widgets, I've added the following:

  • integration of persp-mode.el: based on a save-directory-dir variable, globs (using f.el) all files containing the workspace pattern
  • info documents: based on a info-directory-dir variable, globs (using f.el) all info files in the directory

However, this is not very generic so far, and tweaked towards my very own emacs setup. I'm thinking of a way to make it more generic in order to submit a PR.

Also, I've integrated version information and used font-awesome. Again, I've specified font faces that match both light and dark versions of my theme, but it is easy to use font-lock faces instead . Here's how it looks:

screen shot 2016-12-29 at 13 18 17

Can you share your config about the highlight heading-face? I have no idea how to do it

jueqingsizhe66 avatar Jan 23 '19 22:01 jueqingsizhe66

@jwintz Do you still find out this package is hard to config? Thank you!

Can you share your config about the highlight heading-face? I have no idea how to do it

@jueqingsizhe66 Check out this section here, https://github.com/emacs-dashboard/emacs-dashboard#faces. I think you are looking for dashboard-heading? You can customize this face. Let me know if you have issue customize it!

jcs090218 avatar Oct 26 '20 06:10 jcs090218