summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdotfiles-darwin/bin/env.sh12
-rw-r--r--emacs/init.el6
2 files changed, 11 insertions, 7 deletions
diff --git a/dotfiles-darwin/bin/env.sh b/dotfiles-darwin/bin/env.sh
index 8a13605..7a9d7e5 100755
--- a/dotfiles-darwin/bin/env.sh
+++ b/dotfiles-darwin/bin/env.sh
@@ -1,5 +1,15 @@
#!/usr/bin/env zsh
-for env in DOMAIN HOST UNAME XDG_{{CACHE,CONFIG,DATA}_HOME,RUNTIME_DIR}; do
+for env (DOMAIN HOST SSH_AUTH_SOCK UNAME
+ XDG_{{CACHE,CONFIG,DATA}_HOME,RUNTIME_DIR}); do
launchctl setenv ${env} ${(P)env}
done
+
+# PATH is magic on macOS, and since it only matters for Emacs, let’s
+# make it work in Emacs only. Yep, it’s pretty bad.
+local plist=~/Applications/Emacs.app/Contents/Info.plist
+if [[ -f ${plist} ]]; then
+ plutil -replace LSEnvironment -dictionary ${plist}
+ plutil -insert LSEnvironment.PATH -string "${PATH}" ${plist}
+ /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f ${plist:h:h}
+fi
diff --git a/emacs/init.el b/emacs/init.el
index c22077f..dd8fdbf 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -89,12 +89,6 @@
(load-theme 'doom-one-light 'no-confirm 'no-enable)
:ensure t)
-(use-package exec-path-from-shell
- :config
- (add-to-list 'exec-path-from-shell-variables "SSH_AUTH_SOCK")
- (exec-path-from-shell-initialize)
- :ensure t)
-
(use-package evil
:init (setq evil-want-keybinding nil)
:config (evil-mode)