aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2017-03-09 14:02:37 +0100
committerDavid Runge <dave@sleepmap.de>2017-03-09 14:02:37 +0100
commit3777d4d8b8f3df6a321ccbb87e98cf5560d850a8 (patch)
tree6ffea02fa8a6357678b7128cff76a2ba174e4b92
parent22360b18c4c41d62152b30294b350d25511472e9 (diff)
downloaddotfiles-3777d4d8b8f3df6a321ccbb87e98cf5560d850a8.tar.gz
dotfiles-3777d4d8b8f3df6a321ccbb87e98cf5560d850a8.tar.bz2
dotfiles-3777d4d8b8f3df6a321ccbb87e98cf5560d850a8.tar.xz
dotfiles-3777d4d8b8f3df6a321ccbb87e98cf5560d850a8.zip
.zsh.after/export.zsh: Adding exports for LANG, LC_TIME and LC_MONETARY if seaked locales are available in the system.
-rw-r--r--.zsh.after/export.zsh14
1 files changed, 12 insertions, 2 deletions
diff --git a/.zsh.after/export.zsh b/.zsh.after/export.zsh
index f06613e..fafea00 100644
--- a/.zsh.after/export.zsh
+++ b/.zsh.after/export.zsh
@@ -4,8 +4,18 @@ if [[ -n $TMUX ]];then
else
export TERM="xterm-color"
fi
-# use de_DE.UTF-8 to get 24h format
-export LC_TIME=de_DE.UTF-8
+
+
+available_locale=$(locale -a|tr '\n' ' ')
+if test "${available_locale#*en_DK.utf8}" != $available_locale; then
+ export LC_TIME="en_DK.UTF-8"
+fi
+if test "${available_locale#*de_DE.utf8}" != $available_locale; then
+ export LC_MONETARY="de_DE.UTF-8"
+fi
+if test "${available_locale#*en_US.utf8}" != $available_locale; then
+ export LANG="en_US.UTF-8"
+fi
# keyboard exports for sway
export XKB_DEFAULT_LAYOUT=de