Browse Source

Patch lemonbar final_bar.sh to work in zsh

master
Taylor Bockman 10 years ago
parent
commit
cb871f27fc
  1. 5
      scripts/lemonbar/final_bar.sh

5
scripts/lemonbar/final_bar.sh

@ -30,7 +30,7 @@ memused() {
}
network() {
read lo int1 int2 <<< `ip link | sed -n 's/^[0-9]: \(.*\):.*$/\1/p'`
read -d '' lo int1 int2 <<< $(ip link | sed -n 's/^[0-9]: \(.*\):.*$/\1/p')
if iwconfig $int1 >/dev/null 2>&1; then
wifi=$int1
eth0=$int2
@ -40,6 +40,9 @@ network() {
fi
ip link show $eth0 | grep 'state UP' >/dev/null && int=$eth0 || int=$wifi
ping -c 1 8.8.8.8 >/dev/null 2>&1 &&
echo "$int connected" || echo "$int disconnected"
#int=eth0
}

Loading…
Cancel
Save