Compare commits

...

2 Commits

Author SHA1 Message Date
Jeremy Dormitzer
8b26a8ac24 Remove extra PATH entry 2022-05-31 14:09:50 -04:00
Jeremy Dormitzer
55cc23b13f Add mac-specific emacs config 2022-05-31 14:09:33 -04:00
3 changed files with 31 additions and 1 deletions

View 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)

View File

@ -94,6 +94,7 @@
(require 'init-js) (require 'init-js)
(require 'init-rust) (require 'init-rust)
(require 'init-web) (require 'init-web)
(require 'init-swift)
(require 'init-xml) (require 'init-xml)
(require 'init-yaml) (require 'init-yaml)
(require 'init-groovy) (require 'init-groovy)
@ -113,6 +114,8 @@
(require 'init-wallabag) (require 'init-wallabag)
(require 'init-lola) (require 'init-lola)
(require 'handwriting) (require 'handwriting)
(when (string-equal system-type "darwin")
(require 'init-mac))
(load (expand-file-name (concat user-emacs-directory "local.el")) 'noerror 'nomessage) (load (expand-file-name (concat user-emacs-directory "local.el")) 'noerror 'nomessage)

View File

@ -2,7 +2,6 @@ if [[ -f "/opt/homebrew/bin/brew" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)" eval "$(/opt/homebrew/bin/brew shellenv)"
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi fi
export PATH="$PATH:/Users/jdormit/.local/bin"
eval "$(pyenv init --path)" eval "$(pyenv init --path)"
[[ -d "/opt/homebrew/opt/openjdk@17" ]] && export JAVA_HOME="/opt/homebrew/opt/openjdk@17" [[ -d "/opt/homebrew/opt/openjdk@17" ]] && export JAVA_HOME="/opt/homebrew/opt/openjdk@17"
ulimit -n 524288 ulimit -n 524288