Skip to content
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

Update the elisp blurb in the README #6

Open
BenQuigley opened this issue Jan 21, 2024 · 0 comments
Open

Update the elisp blurb in the README #6

BenQuigley opened this issue Jan 21, 2024 · 0 comments

Comments

@BenQuigley
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant