X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=6360f5f684f1de7fec8840ddc1cbc7e653fbf1a9;hb=41249966740c33a591b9dcc14edc37ddaa595bb6;hp=2875222438588c2505557c0d71b8c6f67b185c52;hpb=594a33254b03d328d820a0db11ac071bb6728710;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 2875222..6360f5f 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -843,6 +843,8 @@ function grmlcomp () { localname=$(hostname) elif check_com hostnamectl ; then localname=$(hostnamectl --static) + else + localname="$(uname -n)" fi hosts=( @@ -1864,7 +1866,7 @@ done function batterydarwin () { GRML_BATTERY_LEVEL='' local -a table -table=( ${$(pmset -g ps)[(w)7,8]%%(\%|);} ) +table=( ${$(pmset -g ps)[(w)8,9]%%(\%|);} ) if [[ -n $table[2] ]] ; then case $table[2] in charging) @@ -2522,6 +2524,8 @@ function grml_maintain_name () { localname=$(hostname) elif check_com hostnamectl ; then localname=$(hostnamectl --static) + else + localname="$(uname -n)" fi # set hostname if not running on local machine