projects
/
~bandali
/
configs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8ea6de1
)
* .emacs.d/init.el: Add 'b/invert-default-face' as a simple light/dark theme toggle.
author
Amin Bandali
<bandali@kelar.org>
Sat, 7 May 2022 20:37:17 +0000
(16:37 -0400)
committer
Amin Bandali
<bandali@kelar.org>
Fri, 20 May 2022 02:20:02 +0000
(22:20 -0400)
.emacs.d/init.el
patch
|
blob
|
blame
|
history
diff --git
a/.emacs.d/init.el
b/.emacs.d/init.el
index
5894ed5
..
32989b0
100644
(file)
--- 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))))))
(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))
+
\f
;;; General key bindings
\f
;;; 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 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)
;; evaling and macro-expanding
(global-set-key (kbd "C-c e b") #'eval-buffer)