From 004ac490ef4496976b5cc98d2e58cdaa389712a6 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 17 Apr 2020 18:58:18 +0200 Subject: [PATCH] Reintroduce helper functions to quickly switch between themes --- init.el | 4 +++- site-lisp/db-utils.el | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 89a54d4..b16df1a 100644 --- a/init.el +++ b/init.el @@ -573,7 +573,9 @@ db/bookmark-add-url db/lookup-smime-key db/dired-from-shell-command - db/system-open)) + db/system-open + db/switch-to-dark-theme + db/switch-to-light-theme)) (use-package db-hydras :commands (hydra-toggle/body diff --git a/site-lisp/db-utils.el b/site-lisp/db-utils.el index 7527c00..dc31942 100644 --- a/site-lisp/db-utils.el +++ b/site-lisp/db-utils.el @@ -525,6 +525,21 @@ it. The bookmarks will finally be sorted by their name." (interactive "sURL: \nsName: ") (db/bookmark-add-with-handler name url #'eww)) + +;;; Appearance + +(defun db/switch-to-dark-theme () + "Switch to dark theme. +This is `db-dark' and `solarized-dark'." + (interactive) + (custom-set-variables '(custom-enabled-themes '(db-dark solarized-dark)))) + +(defun db/switch-to-light-theme () + "Switch to dark theme. +This is `db-light' and `solarized-light'." + (interactive) + (custom-set-variables '(custom-enabled-themes '(db-light solarized-light)))) + ;;; End