summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/eos/jao-dirmon.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/eos/jao-dirmon.el b/lib/eos/jao-dirmon.el
index ab267fc..9d748d1 100644
--- a/lib/eos/jao-dirmon.el
+++ b/lib/eos/jao-dirmon.el
@@ -44,11 +44,12 @@
(defun jao-dirmon--show-deltas (old current deltas)
(with-temp-buffer
(insert "High deltas since " (car old) "\n\n")
- (dolist (d deltas)
+ (dolist (d (seq-sort-by #'cdr #'> deltas))
(insert (format "- %s: %s Mb\n" (car d) (cdr d))))
(insert "\n\nSizeable dirs\n\n")
- (dolist (c (seq-sort-by #'cdr #'> current))
- (when (> (cdr c) jao-dirmon-threshold)
+ (let ((threshold (* 10 jao-dirmon-threshold)))
+ (dolist (c (seq-take-while (lambda (x) (> (cdr x) threshold))
+ (seq-sort-by #'cdr #'> current)))
(insert (format "- %s: %s Mb\n" (car c) (cdr c)))))
(beginning-of-buffer)
(pop-to-buffer (current-buffer) nil t)
@@ -64,7 +65,7 @@
(high ()))
(dolist (c current)
(let ((d (- (cdr c) (alist-get (car c) old 0 nil #'string=))))
- (when (> d jao-dirmon-threshold)
+ (when (> (abs d) jao-dirmon-threshold)
(push c high))))
(setq jao-dirmon-last-delta high)
(jao-dirmon--show-deltas old current jao-dirmon-last-delta)