emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Showing network speed in emacs mode line.


From: Vicente Hernando Ara
Subject: Showing network speed in emacs mode line.
Date: Wed, 20 Jan 2010 00:00:59 +0100

Hi to all the emacs community!

I have written an elisp file(attached to this mail) that shows network speed in emacs mode line.

Just to make it work:

M-x load-file RET /path/to/network-speed.el
M-x network-speed-start

and to stop it showing in the mode line
M-x network-speed-stop

There are several customizable variables. e.g in my .emacs file :
(custom-set-variables
....
 '(network-speed-update-interval 2)   ; Shows network speed every 2 seconds.
 '(network-speed-interface-list (list "ppp0" "eth0")))  ; Network interfaces to be shown in mode line.
 '(network-speed-precision 1) ; Number of digits to be shown after decimal point.
 '(network-speed-format-string " [%NI %AX %AB] ") ;  or i.e: "[%NI rx:%RX tx:%TX]"
 '(network-speed-interface-list (list "ppp0" "eth0"))  ; Network interfaces to be shown in mode line.

network-speed-format-string can be customized to show:
%NI : network interface name
%RB: received bytes
%TB: transmitted bytes
%AB: all received + transmitted bytes.
%RX: received byte speed.
%TX: transmitted byte speed.
%AX: total byte speed.
%%%: escape secuence for % character.

I hope you test it and enjoy!
Any constructive criticism is welcomed.
I also would be glad about signing FSF papers for this file if it is considered worthy.

Kind regards,
Vicente.

Attachment: network-speed.el
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]