Skip to content

Update the elisp blurb in the README #6

@BenQuigley

Description

@BenQuigley

Thanks for this repo. We could make a couple updates to the example blurb:

;; .doom.d/config.el
(let ((alternatives '("nameoffirstfile.svg"
                      "nameofanotherfile.png"
                      "nameofathirdfile.svg")))
  (setq fancy-splash-image
        (concat doom-private-dir "splash/"
                (nth (random (length alternatives)) alternatives))))

I wanted to be able to just drop my files in the splash dir, so I took this and updated it to:

;; Pick a random splash image from {user-dir}/splash-images/.
(let* ((splash-dir (concat doom-user-dir "splash-images/"))
       (files (directory-files splash-dir t "\\(\\.png\\|\\.svg\\|\\.jpe?g\\)$")))
  (setq fancy-splash-image
        (nth (random (length files)) files)))

Let me know if you'd like a PR, or feel free to add this version yourself if you like it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions