if we don't have wifi, show our IP for egress. don't error if we don't have

Maildir
This commit is contained in:
Aaron Bieber 2020-08-18 17:32:54 -06:00
parent 242c31abde
commit 39cbae1b4a

17
bin/bar
View File

@ -52,13 +52,24 @@ END {
EOF
)
# TODO check lengte and make sure we aren't wayy off base
net() {
local n net
n=$(ifconfig egress 2>/dev/null | grep "inet")
net=$(echo "$n" | awk '{print $2}')
printf "%s" "${net}"
}
# TODO check length and make sure we aren't wayy off base
wifi() {
local w sig ssid
w=$(ifconfig wlan | grep "ieee80211")
w=$(ifconfig wlan 2>/dev/null | grep "ieee80211")
if [ $? == 0 ]; then
ssid="$(echo "$w" | awk "${wifi_ssid}")"
sig="$(echo "$w" | awk "${wifi_sig}")"
printf "%s : %s" "${ssid}" "${sig}"
else
printf "%s" "$(net)"
fi
}
beat() {
@ -129,6 +140,7 @@ battery() {
}
mail() {
if [ -d ~/Maildir ]; then
set -A mail_list $(ls -1 ~/Maildir | egrep -vi "gmail|trash")
count=0
for dir in "${mail_list[@]}"; do
@ -140,6 +152,7 @@ mail() {
echo -n ","
fi
done
fi
}
vmm() {