2 min read

An Addendum to the Theme Toggle Snippet

Recently I wrote about a little function I wrote to toggle between the light and dark theme in KDE - Plasma and switching my Emacs theme in the process. I still wasn't quite satisfied and tweaked it a bit more.

I like my desktop to be neat and somewhat pleasing to the eye, and because I obviously rather optimize setups instead of actually doing something I also added changing the wallpaper to my theme-toggle. The editor theme has to fit the wallpaper or?

Luckily setting the wallpaper via the command-line is a straight forward thing in KDE Plasma (at the least in 6.3) and the command plasma-apply-wallpaperimage1 is your friend here. Thus the elisp snippet now looks like this:

(defun svbck-dark ()
  ;; Setting the KDE-dark theme in conjunction with EF-Owl theme and a dark wallpaper
	(interactive)

	(shell-command "plasma-apply-colorscheme BreezeDark")
	(shell-command "plasma-apply-wallpaperimage ~/ENTER/PATH/TO/WALLPAPER")
	(mapc #'disable-theme custom-enabled-themes)
	(load-theme 'ef-owl :no-confirm))

(defun svbck-medium ()
  ;; Setting the KDE-dark theme in conjunction with EF-Owl theme and a light wallpaper
	(interactive)
	(shell-command "plasma-apply-colorscheme BreezeDark" )
	(shell-command "plasma-apply-wallpaperimage ~/~/ENTER/PATH/TO/WALLPAPER")
	(mapc #'disable-theme custom-enabled-themes)
	(load-theme 'ef-owl :no-confirm))

(defun svbck-light ()
  ;; Setting the KDE-light theme in conjunction with Doric light theme and a light wallpaper
	(interactive)
	(shell-command "plasma-apply-colorscheme BreezeLight")
        (shell-command "plasma-apply-wallpaperimage ~/~/ENTER/PATH/TO/WALLPAPER")
	(mapc #'disable-theme custom-enabled-themes)
	(load-theme 'doric-earth :no-confirm))

In my configuration I have three presets for different use-cases and so far I am rather satisfied with. To have easier access to the themes I had build a little transient which in return can be invoked by to my menu-transient.

My current dark theme. EF-Owl and The Shipwreck by Claude-Joseph Vernet
And the light one with the new Doric Earth theme and Caspar David Friedrich's The lone Tree

It is very likely that I will add some transparency presets as an additional, and occasional eye-candy as well at some point.

100 Days to Offload 10/100


  1. Much more forward than “finding” a suitable/nice wallpaper I might add. ↩︎