summaryrefslogtreecommitdiff
path: root/dotfiles-darwin
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2022-01-29 13:21:01 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2022-01-29 13:21:01 +0000
commit36ad01f7fa3c94647860f3b0ed73879c608fcf12 (patch)
tree8b16b76ce663680a84a32e7a21ca8323d941fab2 /dotfiles-darwin
parentd8b279da154813346631479ed89e107d434f3aae (diff)
darwin/env.sh: Run script in a login shell
We need a login shell to have the right PATH set. Also, we need not to call stty when TERM is empty, which it will be when that script runs.
Diffstat (limited to 'dotfiles-darwin')
-rw-r--r--dotfiles-darwin/launchd/Makefile1
-rw-r--r--dotfiles-darwin/launchd/org.awhk.env.plist8
2 files changed, 7 insertions, 2 deletions
diff --git a/dotfiles-darwin/launchd/Makefile b/dotfiles-darwin/launchd/Makefile
index 54d7b2a..83d0c81 100644
--- a/dotfiles-darwin/launchd/Makefile
+++ b/dotfiles-darwin/launchd/Makefile
@@ -1,3 +1,4 @@
+export ZSH := $(shell which zsh)
export ENV_SH := $(realpath ../bin/env.sh)
all: $(foreach plist, $(wildcard *.plist), ~/Library/LaunchAgents/${plist})
diff --git a/dotfiles-darwin/launchd/org.awhk.env.plist b/dotfiles-darwin/launchd/org.awhk.env.plist
index 49b42d8..f598479 100644
--- a/dotfiles-darwin/launchd/org.awhk.env.plist
+++ b/dotfiles-darwin/launchd/org.awhk.env.plist
@@ -5,8 +5,12 @@
<key>Label</key>
<string>org.awhk.env</string>
- <key>Program</key>
- <string>${ENV_SH}</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>${ZSH}</string>
+ <string>-l</string>
+ <string>${ENV_SH}</string>
+ </array>
<key>StandardOutPath</key>
<string>${HOME}/Library/Logs/org.awhk.env.log</string>