mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-22 21:22:52 +00:00
Fixed networkup/down bug (crazy num)
This commit is contained in:
parent
4be623eec5
commit
3562a69c23
3 changed files with 3 additions and 3 deletions
2
TODO.org
2
TODO.org
|
@ -14,7 +14,7 @@ Each module writes to stdout.
|
|||
- Add dependencies like bc
|
||||
|
||||
Bugs to fix:
|
||||
- Fix networkup/down crazy values
|
||||
none
|
||||
|
||||
Modules to Write:
|
||||
- We are more than welcome to accept ideas and pull requests for future
|
||||
|
|
|
@ -12,7 +12,7 @@ get_down_traffic()
|
|||
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
|
||||
for IFACE in $IFACES; do
|
||||
if [ $IFACE != "lo" ]; then
|
||||
RECIEVE1=$(($(ip -s -c link show wlan0 | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE1))
|
||||
RECIEVE1=$(($(ip -s -c link show $IFACE | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE1))
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ get_up_traffic()
|
|||
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
|
||||
for IFACE in $IFACES; do
|
||||
if [ $IFACE != "lo" ]; then
|
||||
TRANSMIT1=$(($(ip -s -c link show wlan0 | tail -n1 | cut -d " " -f5) + TRANSMIT1))
|
||||
TRANSMIT1=$(($(ip -s -c link show $IFACE | tail -n1 | cut -d " " -f5) + TRANSMIT1))
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue