mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-23 13:32:53 +00:00
Added a delta var for the network up and down modules
This commit is contained in:
parent
549ccc0f41
commit
8a25910355
2 changed files with 6 additions and 4 deletions
|
@ -1,11 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Prints out the current down network traffic in DJNADJNA
|
# Prints out the current down network traffic in MB
|
||||||
|
|
||||||
PREFIX=' '
|
PREFIX=' '
|
||||||
|
|
||||||
get_down_traffic()
|
get_down_traffic()
|
||||||
{
|
{
|
||||||
|
DELTA=2
|
||||||
RECIEVE1=0
|
RECIEVE1=0
|
||||||
RECIEVE2=0
|
RECIEVE2=0
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ get_down_traffic()
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
sleep 2
|
sleep $DELTA
|
||||||
|
|
||||||
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
|
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
|
||||||
for IFACE in $IFACES; do
|
for IFACE in $IFACES; do
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Prints out the current up network traffic in DJNADJNA
|
# Prints out the current up network traffic in MB
|
||||||
|
|
||||||
PREFIX=' '
|
PREFIX=' '
|
||||||
|
|
||||||
get_up_traffic()
|
get_up_traffic()
|
||||||
{
|
{
|
||||||
|
DELTA=2
|
||||||
TRANSMIT1=0
|
TRANSMIT1=0
|
||||||
TRANSMIT2=0
|
TRANSMIT2=0
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ get_up_traffic()
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
sleep 2
|
sleep $DELTA
|
||||||
|
|
||||||
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
|
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
|
||||||
for IFACE in $IFACES; do
|
for IFACE in $IFACES; do
|
||||||
|
|
Loading…
Reference in a new issue