summaryrefslogtreecommitdiff
path: root/dotfiles-darwin/emacs/init.el
blob: 44bcda640c7d5776b6e20781e0fb9a3c8eac65fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(setq 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)))