# HG changeset patch # User Steve Losh # Date 1659666777 14400 # Node ID 61b4f1f3a9f15ce474f977509aef9e5f4ba0ef8c # Parent 03403e2b1a367b2d5819ecf2822bc6c936b45e25 More diff -r 03403e2b1a36 -r 61b4f1f3a9f1 stumpwmrc --- a/stumpwmrc Sat Jul 30 11:23:28 2022 -0400 +++ b/stumpwmrc Thu Aug 04 22:32:57 2022 -0400 @@ -237,15 +237,15 @@ ;;;; Budget ------------------------------------------------------------------ -(defparameter *budget/per-day* - (first (losh:read-all-from-file "/home/sjl/Dropbox/budget/per-day"))) - (defparameter *tz/eastern* (local-time:find-timezone-by-location-name "US/Eastern")) (defparameter *budget/start* (local-time:encode-timestamp 0 0 0 0 26 7 2022 :timezone *tz/eastern*)) +(defun budget/per-day () + (first (losh:read-all-from-file "/home/sjl/Dropbox/budget/per-day"))) + (defun budget/elapsed () (local-time:timestamp-difference (local-time:now) *budget/start*)) @@ -253,7 +253,7 @@ (floor (/ (budget/elapsed) (* 60 60 24)))) (defun budget/in () - (* (budget/days-elapsed) *budget/per-day*)) + (* (budget/days-elapsed) (budget/per-day))) (defun budget/out () (loop :for path :in (directory "/home/sjl/Dropbox/budget/hosts/*/total")