A little bit of emacs magic
Emacs provides endless entertainment, not just in using it but in configuring it too. I came across the dashboard package, whose purpose is to show you useful things about your emacs session, and configured it to show me a random “inspirational” image! Details below.
(setq image-list '("smol-miki-suzu-flip.png" "smol-miki-watch.png" "smol-msc.png" "smol-miki-suzu-scowl.png" "smol-smh.png"))
The filenames of the images are saved in a list. If I find a new source of inspiration then I just need to add the filename to this list.
(setq random-banner (concat "~/Dropbox/Writing/KatawaShoujo/Images/" (nth (random (length image-list)) image-list)))
One of the members of the list of filenames is chosen at random and concatenated with the path to the image directory. Implementing it this way has the minor disadvantage that all the images have to be in the same directory, but that reflects how they are currently stored. If this changes in future then I can just make the filenames include the path. Notice how elegant the expression to chose a random filename is; it is highly readable even if you have never written a single line of Lisp.
(use-package dashboard :ensure t :config (dashboard-setup-startup-hook) (setq dashboard-banner-logo-title "Welcome to Yamaku" dashboard-startup-banner random-banner dashboard-center-content t dashboard-show-shortcuts nil dashboard-items '() dashboard-set-footer nil dashboard-set-init-info nil))
This is just the configuration of the dashboard package, where I’ve turned almost everything off except a welcome message and the image.
Here is one of the glorious sights that greets me when I fire up emacs! (Image source)