diff options
| -rw-r--r-- | home/.zprofile | 18 | ||||
| -rw-r--r-- | home/.zshrc | 5 |
2 files changed, 14 insertions, 9 deletions
diff --git a/home/.zprofile b/home/.zprofile index a4d0661..f192a91 100644 --- a/home/.zprofile +++ b/home/.zprofile @@ -9,15 +9,15 @@ export XMODIFIERS=@im=ibus export QT_IM_MODULE=ibus export LANG='en_US.utf8' -if [[ -x /usr/bin/locale ]]; then - local mylocale - mylocale=`/usr/bin/locale -a` - if [[ $mylocale =~ "de_AT.utf8" ]]; then - #export LC_TIME='de_AT.UTF-8' - export LC_MONETARY='de_AT.UTF-8' - elif [[ $mylocale =~ "de_DE.utf8" ]]; then - #export LC_TIME='de_DE.UTF-8' - export LC_MONETARY='de_DE.UTF-8' +if main_node; then + if [[ -x /usr/bin/locale ]]; then + local mylocale + mylocale=`/usr/bin/locale -a` + if [[ $mylocale =~ "de_AT.utf8" ]]; then + export LC_MONETARY='de_AT.utf8' + elif [[ $mylocale =~ "de_DE.utf8" ]]; then + export LC_MONETARY='de_DE.utf8' + fi fi fi diff --git a/home/.zshrc b/home/.zshrc index 2b56de1..91f24cb 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -273,6 +273,11 @@ if main_node; then curl -s "https://lothal.kom.tuwien.ac.at/bomsquery/boms-devrep.py?format=json&label=${device}" | jq --color-output | less -E } + vlan () { + vlan=`echo ${1} | sed 's/^0*//'` + curl -s https://cantonica.kom.tuwien.ac.at/neu/vlaniflist/ -X POST -d "vlan=${vlan}" | sed 's/|/¦/g' | html2text --pad-tables --body-width 0 | grep -v Startseite + } + yaml_validate () { python -c 'import sys, yaml, json; yaml.safe_load(sys.stdin.read())' } |
