aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2017-03-09 15:02:38 +0100
committerDavid Runge <dave@sleepmap.de>2017-03-09 15:02:38 +0100
commitf35b1721edc62b127be2911e140a40ee2f149ae0 (patch)
tree11026f9bf893b7967782945efd2803497a6b170a
parentfd0e6906373aa6e0306cd83df9b41c64f4d0a13a (diff)
parent3777d4d8b8f3df6a321ccbb87e98cf5560d850a8 (diff)
downloaddotfiles-f35b1721edc62b127be2911e140a40ee2f149ae0.tar.gz
dotfiles-f35b1721edc62b127be2911e140a40ee2f149ae0.tar.bz2
dotfiles-f35b1721edc62b127be2911e140a40ee2f149ae0.tar.xz
dotfiles-f35b1721edc62b127be2911e140a40ee2f149ae0.zip
Merge branch 'master' of sleepmap.de:config/dotfiles
* 'master' of sleepmap.de:config/dotfiles: .zsh.after/export.zsh: Adding exports for LANG, LC_TIME and LC_MONETARY if seaked locales are available in the system. .zsh.after/functions.zsh: Adding support to export .asc files using gpg within ex().
-rw-r--r--.zsh.after/export.zsh14
-rw-r--r--.zsh.after/functions.zsh3
2 files changed, 15 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
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh
index 5be8e73..b089ff6 100644
--- a/.zsh.after/functions.zsh
+++ b/.zsh.after/functions.zsh
@@ -149,6 +149,9 @@ ex() {
*.gpg)
gpg -o ${1%".gpg"} -d $1
;;
+ *.asc)
+ gpg -o ${1%".asc"} -d $1
+ ;;
*.gz)
gunzip $1
;;