Compare commits
2 Commits
2c90886299
...
8b26a8ac24
Author | SHA1 | Date | |
---|---|---|---|
|
8b26a8ac24 | ||
|
55cc23b13f |
28
emacs/.emacs.d/config/init-mac.el
Normal file
28
emacs/.emacs.d/config/init-mac.el
Normal file
@ -0,0 +1,28 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar my-light-theme 'jdormit-doom-solarized-light)
|
||||
(defvar my-dark-theme 'doom-solarized-dark)
|
||||
|
||||
(defun mac-appearance () (plist-get (mac-application-state) :appearance))
|
||||
|
||||
(defun dark-theme-enabled? ()
|
||||
(string-equal (mac-appearance)
|
||||
"NSAppearanceNameDarkAqua"))
|
||||
|
||||
(defun set-theme-from-system ()
|
||||
(if (dark-theme-enabled?)
|
||||
(consult-theme my-dark-theme)
|
||||
(consult-theme my-light-theme)))
|
||||
|
||||
(defvar theme-timer-status-cache (mac-appearance))
|
||||
(defun theme-timer-fn ()
|
||||
(let ((appearance (mac-appearance)))
|
||||
(when (not (string-equal appearance theme-timer-status-cache))
|
||||
(set-theme-from-system)
|
||||
(setq theme-timer-status-cache appearance))))
|
||||
(defun theme-timer-hook ()
|
||||
(run-at-time "2 sec" 2 #'theme-timer-fn))
|
||||
|
||||
(add-hook 'after-init-hook #'theme-timer-hook)
|
||||
|
||||
(provide 'init-mac)
|
@ -94,6 +94,7 @@
|
||||
(require 'init-js)
|
||||
(require 'init-rust)
|
||||
(require 'init-web)
|
||||
(require 'init-swift)
|
||||
(require 'init-xml)
|
||||
(require 'init-yaml)
|
||||
(require 'init-groovy)
|
||||
@ -113,6 +114,8 @@
|
||||
(require 'init-wallabag)
|
||||
(require 'init-lola)
|
||||
(require 'handwriting)
|
||||
(when (string-equal system-type "darwin")
|
||||
(require 'init-mac))
|
||||
|
||||
(load (expand-file-name (concat user-emacs-directory "local.el")) 'noerror 'nomessage)
|
||||
|
||||
|
@ -2,7 +2,6 @@ if [[ -f "/opt/homebrew/bin/brew" ]]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
|
||||
fi
|
||||
export PATH="$PATH:/Users/jdormit/.local/bin"
|
||||
eval "$(pyenv init --path)"
|
||||
[[ -d "/opt/homebrew/opt/openjdk@17" ]] && export JAVA_HOME="/opt/homebrew/opt/openjdk@17"
|
||||
ulimit -n 524288
|
||||
|
Loading…
Reference in New Issue
Block a user