diff options
| author | David Kaufmann <astra@ionic.at> | 2025-03-17 01:56:35 +0100 |
|---|---|---|
| committer | David Kaufmann <astra@ionic.at> | 2025-03-17 01:56:35 +0100 |
| commit | 4c9a5d37405b976b2e9eba9fcaea95286efaa63f (patch) | |
| tree | 36d49742f5f3ef57bcb4f0a1f8275bcb7263c3d2 | |
| parent | c6f4cf782902ec58f04b8fb04ab9b4463638d3ff (diff) | |
| download | config-4c9a5d37405b976b2e9eba9fcaea95286efaa63f.tar.gz | |
| -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())' } |
