summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dotfiles-darwin/emacs/init.el8
-rw-r--r--emacs/init.el12
2 files changed, 14 insertions, 6 deletions
diff --git a/dotfiles-darwin/emacs/init.el b/dotfiles-darwin/emacs/init.el
index c4b1e07..44bcda6 100644
--- a/dotfiles-darwin/emacs/init.el
+++ b/dotfiles-darwin/emacs/init.el
@@ -3,10 +3,12 @@
(when (executable-find "gls")
(setq insert-directory-program "gls"))
-(defun is-macos-dark ()
+(defun macos-dark-p ()
(interactive)
(string= (shell-command-to-string "defaults read -g AppleInterfaceStyle")
"Dark\n"))
-(run-at-time nil (* 15 60) 'maybe-switch-theme 'doom-one-light 'doom-one
- 'is-macos-dark)
+(add-hook 'after-init-hook
+ (lambda ()
+ (run-at-time nil (* 15 60) 'maybe-switch-theme awhk-day-theme
+ awhk-night-theme 'macos-dark-p)))
diff --git a/emacs/init.el b/emacs/init.el
index 29c71cc..f106492 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -55,6 +55,10 @@
(blink-cursor-mode -1)
(scroll-bar-mode -1))
+(defvar awhk-day-theme nil "Theme to use during the day.")
+
+(defvar awhk-night-theme nil "Theme to use during the night.")
+
(use-package bazel
:config (setq bazel-buildifier-before-save t)
:ensure t)
@@ -74,13 +78,15 @@
(use-package doom-themes
:config
- (setq doom-themes-enable-bold t
+ (setq awhk-day-theme 'doom-one-light
+ awhk-night-theme 'doom-one
+ doom-themes-enable-bold t
doom-themes-enable-italic t)
(add-to-list 'doom-themes-base-faces
'(nobreak-space :inherit 'default :underline builtin)
t)
- (load-theme 'doom-one 'no-confirm 'no-load)
- (load-theme 'doom-one-light 'no-confirm 'no-load)
+ (load-theme 'doom-one 'no-confirm 'no-enable)
+ (load-theme 'doom-one-light 'no-confirm 'no-enable)
:ensure t)
(use-package exec-path-from-shell