From dee619824a9d5286be5b6c27b3fa16cf4142385f Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 10 Jun 2022 01:55:16 +0100 Subject: jao-dirmon tweaks --- lib/eos/jao-dirmon.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/eos') diff --git a/lib/eos/jao-dirmon.el b/lib/eos/jao-dirmon.el index 4fb8609..894d740 100644 --- a/lib/eos/jao-dirmon.el +++ b/lib/eos/jao-dirmon.el @@ -34,11 +34,11 @@ (defun jao-dirmon-sizes () (mapcar (lambda (f) - (let ((x (split-string (jao-shell-string "du -s" f)))) - (cons (cadr x) (string-to-number (car x))))) + (let ((x (split-string (jao-shell-string "du -b -s" f)))) + (cons (cadr x) (/ (string-to-number (car x)) 1024 1024)))) (jao-dirmon-dirs))) -(defvar jao-dirmon-threshold 100000) +(defvar jao-dirmon-threshold 100) (defvar jao-dirmon-last-delta nil) ;;;###autoload @@ -49,10 +49,10 @@ (high ())) (dolist (c current) (let ((d (- (cdr c) (alist-get (car c) old 0 nil #'string=)))) - (when (> d jao-dirmon-threshold) + (when (> d jao-dirmon-threshold) (push c high)))) (setq jao-dirmon-last-delta high) - (let ((prompt (format"High deltas: %s. Save state?" high))) + (let ((prompt (format "High deltas: %s. Save state?" high))) (when (y-or-n-p prompt) (setf (multisession-value jao-dirmon-last) current))) jao-dirmon-last-delta)) -- cgit v1.2.3