I use this on my on my deChromebook — a C720 with Chrome removed and Linux installed. Some of my Internet access is via Internet-On-The-Go, and, knowing how much bandwidth I'm using is usefull. I can use the network monitor part of the network panel plugin, but it's just as easy to use a little script.
Here's the script:
#!/bin/bash traf=$(ifconfig wlan0 | grep RX\ byte) echo $traf sleep 5 wmctrl -r wlan0-stats -t 1 while : do clear traf=$(ifconfig wlan0 | grep RX\ byte) echo $traf sleep 20 clear sleep 2 done
I use a panel launcher on my desktop to start the script and put it on the second desktop (numbered 1 in Xfce.) This could be easily converted to a menu launcher.
And the Launcher content (Watch the long non-wrapping line):
Name: ifconfig Comment: Command: xterm -fa 'Monospace' -fs 14 -title wlan0-stats -bg yellow -geometry 60x2+500+1000 -e "/usr/local/bin/t-ifc" Working Directory: Icon: (as desired) Options unchecked
Here's what they do.
The script t-ifc:
traf= ; gets the RX/TX line for wlan0 in the variable, leading spaces are stripped echo ; displays it sleep 5 ; leaves it in launch workspace for 5 seconds wmctrl ; moves named window to second desktop (1) while ; starts endless loop to update window do ; clear ; clears window traf= ; gets RX/TX in loop echo ; puts it on screen sleep 20 ; leaves it there for 20 seconds clear ; clears window sleep 2 ; leaves empty for 2 seconds done ; completes loop - do it again
The launcher:
Name: ; call it something Comment: ; I don't use. If filled will be included in tool-tip Command: ; Open xterm and run the script -fa/fs ; make it readable for old person -title ; sets window title for wnctrl to use in the move -bg ; set background color for xterm window -geometry ; set size and position of window -e ; command to execute Working Directory: ; I don't set Icon: ; (as desired, I usually make my own) Options unchecked