diff options
-rw-r--r-- | init.el | 5 | ||||
-rw-r--r-- | lib/eos/jao-dirmon.el | 10 |
2 files changed, 7 insertions, 8 deletions
@@ -234,9 +234,8 @@ suffixes))) ;;;; disk monitoring -(when (featurep 'multisession) - (use-package jao-dirmon)) - +(use-package jao-dirmon + :commands jao-dirmon-report) ;;; Crypto ;;;; PGP, EPG, passwords (setq epg-pinentry-mode 'loopback) 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)) |