diff options
author | Yann Herklotz <git@yannherklotz.com> | 2021-09-11 15:39:09 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2021-09-11 15:39:09 +0100 |
commit | c8c0e93ad9224f46fa959b9e113625611997cd1a (patch) | |
tree | d9127238449689254191b87c2a2037af158ff52b /doom | |
parent | 47a594d626b2c3aaeb57b98dcc2ebf4da5d3924a (diff) | |
download | dotfiles-c8c0e93ad9224f46fa959b9e113625611997cd1a.tar.gz dotfiles-c8c0e93ad9224f46fa959b9e113625611997cd1a.zip |
Add mac configuration with theme
Diffstat (limited to 'doom')
-rw-r--r-- | doom/config.el | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/doom/config.el b/doom/config.el index 18b6d6c..7f49356 100644 --- a/doom/config.el +++ b/doom/config.el @@ -99,11 +99,20 @@ ;; Mac configuration (when (eq system-type 'darwin) - (setq mac-right-option-modifier 'none - mac-option-key-is-meta nil - mac-command-key-is-meta t - mac-command-modifier 'meta - mac-option-modifier nil)) + (progn (setq mac-right-option-modifier 'none + mac-option-key-is-meta nil + mac-command-key-is-meta t + mac-command-modifier 'meta + mac-option-modifier nil) + + (defun ymhg/apply-theme (appearance) + "Load theme, taking current system APPEARANCE into consideration." + (mapc #'disable-theme custom-enabled-themes) + (pcase appearance + ('light (load-theme 'modus-operandi t)) + ('dark (load-theme 'modus-vivendi t)))) + + (add-hook 'ns-system-appearance-change-functions #'ymhg/apply-theme))) (defun y/insert-date () "Insert a timestamp according to locale's date and time format." |