summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorBryce Fisher-Fleig <hckr1292@gmail.com>2017-03-07 09:09:43 -0800
committerBryce Fisher-Fleig <hckr1292@gmail.com>2017-03-07 09:09:43 -0800
commit8445c761f01c3b9d618a4c7bf7f55c427dfc4aa8 (patch)
tree97e4fa6d4b6aa0e4c9f9e0460fe0c2802994c96f /assets
parent86b070814388081fa76efc4ee9d7de3437445ef3 (diff)
Setup locale properly in new shell (thanks @casimir)
Diffstat (limited to 'assets')
-rwxr-xr-xassets/osx/Alacritty.app/Contents/MacOS/launcher9
1 files changed, 9 insertions, 0 deletions
diff --git a/assets/osx/Alacritty.app/Contents/MacOS/launcher b/assets/osx/Alacritty.app/Contents/MacOS/launcher
index be2ee7f8..d3c10724 100755
--- a/assets/osx/Alacritty.app/Contents/MacOS/launcher
+++ b/assets/osx/Alacritty.app/Contents/MacOS/launcher
@@ -1,6 +1,15 @@
#!/bin/bash
+# Dynamically discover canonical path to alacritty binary
BIN_DIR=$(cd "$(dirname "$0")"; pwd)
+# Query OS for locale and setup alacritty shell to conform
+ALACRITTY_LOCALE="$(osascript -e "return user locale of (get system info)")"
+export LANG="${ALACRITTY_LOCALE}.UTF-8"
+export LC_CTYPE="${ALACRITTY_LOCALE}.UTF-8"
+
+# Start alacritty in user's home directory
cd "$HOME"
+
+# Engage
exec "$BIN_DIR/alacritty"