diff --git a/bashrc b/bashrc index f4707b8..0d8910e 100755 --- a/bashrc +++ b/bashrc @@ -452,6 +452,7 @@ __my_battery_status(){ alias bat='__my_battery_status %s\\n' ip-address(){ + test type ifconfig >/dev/null 2>&1 || return 1 local ip=$(LANG=C ifconfig | \grep --color=never "inet " | \grep --color=never -v "127.0.0.1" | awk '{print $2}') test -n "$ip" && printf $1 $ip } diff --git a/profile b/profile index 1e72db8..5fb9425 100755 --- a/profile +++ b/profile @@ -1,5 +1,7 @@ #!/bin/sh +# ~/.dotfiles/profile + type fortune >/dev/null 2>&1 && { echo fortune @@ -33,5 +35,5 @@ type setterm >/dev/null 2>&1 && setterm -blank 30 -powersave on # -powerdown 10 # in my environment powerdown does not work mkdir -p ~/.my/log -mkdir -p /tmp/$USER-tmp +mkdir -p "/tmp/$USER-tmp"