Hi,

Here's a proposition for a tiny patch, consisting of using (more) "standard"
notations for bits and bytes:

- writing Bytes with a capitalized B (small b being for bits)

- expressing network speed in bps (bits per second), not in Byte per second
  (the "Byte" view being generally used for storage, like mem and disk, while
  the "bit" view is more for network measures).

Excellent add-ons, by the way...

Best regards,
  Seb

-- 
Sébastien Vauban
diff --git a/contrib/mem.lisp b/contrib/mem.lisp
index 9825b31..983c3cd 100644
--- a/contrib/mem.lisp
+++ b/contrib/mem.lisp
@@ -77,7 +77,7 @@ total amount of memory, allocated memory, allocated/total ratio"
   (let* ((mem (mem-usage))
 	 (|%| (truncate (* 100 (nth 2 mem))))
 	 (allocated (truncate (/ (nth 1 mem) 1000))))
-    (format nil "MEM: ~4D mb ^[~A~3D%^] " allocated (bar-zone-color |%|) |%|)))
+    (format nil "MEM: ~4D MB ^[~A~3D%^] " allocated (bar-zone-color |%|) |%|)))
 
 (defun fmt-mem-usage-bar (ml &optional (width *mem-usage-bar-width*) (full *mem-usage-bar-full*) (empty *mem-usage-bar-empty*))
   "Returns a coloured bar-graph representing the current allocation of memory."
diff --git a/contrib/net.lisp b/contrib/net.lisp
index a86569c..4251b12 100644
--- a/contrib/net.lisp
+++ b/contrib/net.lisp
@@ -158,9 +158,9 @@ For the second case rescans route table every minute."
 	dn up)
     (defun kbmb (x y)
       (if (>= (/ x 1e6) y)
-	  (list (/ x 1e6) "m")
-	  (list (/ x 1e3) "k")))
+	  (list (/ x 1e6) "Mbps")
+	  (list (/ x 1e3) "Kbps")))
     (setq dn (kbmb (car net) 0.1)
 	  up (kbmb (cadr net) 0.1))
-    (format nil "~A: ~5,2F~A/~5,2F~A " (net-device)
-	    (car dn) (cadr dn) (car up) (cadr up))))
+    (format nil "~A: ~5,2F ~A / ~5,2F ~A " (net-device)
+	    (* 8 (car dn)) (cadr dn) (* 8 (car up)) (cadr up))))
_______________________________________________
Stumpwm-devel mailing list
Stumpwm-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/stumpwm-devel

Reply via email to