diff options
author | Amin Bandali <bandali@kelar.org> | 2022-05-07 16:37:17 -0400 |
---|---|---|
committer | Amin Bandali <bandali@kelar.org> | 2022-05-19 22:20:02 -0400 |
commit | 6cf7efb05e6c807bd1d8c4c4f2f6db40cf183835 (patch) | |
tree | 728698fefec2a9f89292ecb238a1f4558cf53fcd | |
parent | 8ea6de120f0b940cd51bc0331d88d4f9e508b459 (diff) | |
download | configs-6cf7efb05e6c807bd1d8c4c4f2f6db40cf183835.tar.gz configs-6cf7efb05e6c807bd1d8c4c4f2f6db40cf183835.tar.xz configs-6cf7efb05e6c807bd1d8c4c4f2f6db40cf183835.zip |
* .emacs.d/init.el: Add 'b/invert-default-face' as a simple light/dark theme toggle.
Diffstat (limited to '')
-rw-r--r-- | .emacs.d/init.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 5894ed5..32989b0 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -548,6 +548,12 @@ Make N (default: 1) copies of the current line or region." (dotimes (_ (abs n1)) (insert text)))))) +(defun b/invert-default-face () + "Invert the `default' face (swap its background and foreground). +Effectively a very simple light/dark theme toggle switch." + (interactive) + (invert-face 'default)) + ;;; General key bindings @@ -557,6 +563,7 @@ Make N (default: 1) copies of the current line or region." (global-set-key (kbd "C-c j") #'b/join-line-top) (global-set-key (kbd "C-S-j") #'b/join-line-top) (global-set-key (kbd "C-c x") #'execute-extended-command) +(global-set-key (kbd "C-c v") #'b/invert-default-face) ;; evaling and macro-expanding (global-set-key (kbd "C-c e b") #'eval-buffer) |