diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2021-12-11 13:03:03 +0000 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2021-12-11 13:03:03 +0000 |
| commit | 0ab13ec1d17cdeacb042b9c935618e9f018d81b0 (patch) | |
| tree | 987c42ba1d492da07a97d58074199a843194dc1f /dotfiles-darwin | |
| parent | 637aec9cc62bec5b4c49099355ce5834e57e6965 (diff) | |
emacs: Refactor configuration
Diffstat (limited to 'dotfiles-darwin')
| -rw-r--r-- | dotfiles-darwin/emacs/init.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/dotfiles-darwin/emacs/init.el b/dotfiles-darwin/emacs/init.el index 44bcda6..184d681 100644 --- a/dotfiles-darwin/emacs/init.el +++ b/dotfiles-darwin/emacs/init.el @@ -1,14 +1,15 @@ -(setq mac-right-option-modifier 'none) +;; General Configuration + +(setq mac-right-command-modifier 'meta + mac-right-option-modifier 'none) (when (executable-find "gls") (setq insert-directory-program "gls")) -(defun macos-dark-p () - (interactive) - (string= (shell-command-to-string "defaults read -g AppleInterfaceStyle") - "Dark\n")) -(add-hook 'after-init-hook - (lambda () - (run-at-time nil (* 15 60) 'maybe-switch-theme awhk-day-theme - awhk-night-theme 'macos-dark-p))) +;; Theme Management + +(when window-system + (my/with-add-hook 'after-init-hook + (run-at-time nil (* 15 60) #'my/maybe-switch-theme my/day-theme + my/night-theme #'my/macos-dark-p))) |
