diff options
author | Case Duckworth | 2022-04-02 13:53:11 -0500 |
---|---|---|
committer | Case Duckworth | 2022-04-02 13:53:39 -0500 |
commit | abf24e71c784111a65f56dc6613c020495c49927 (patch) | |
tree | 67b5b1c80617d4514e1e6ffcf49d7f96d9b10592 /init.el | |
parent | Change default mpv viewer to cache (diff) | |
download | emacs-abf24e71c784111a65f56dc6613c020495c49927.tar.gz emacs-abf24e71c784111a65f56dc6613c020495c49927.zip |
Enable +elfeed-update-command to run only sometimes
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/init.el b/init.el index 8e92143..3c1d975 100644 --- a/init.el +++ b/init.el | |||
@@ -1394,8 +1394,17 @@ See also `crux-reopen-as-root-mode'." | |||
1394 | (:hook #'reading-mode) | 1394 | (:hook #'reading-mode) |
1395 | (:option +elfeed--update-repeat (* 60 30) ; 1/2 hour | 1395 | (:option +elfeed--update-repeat (* 60 30) ; 1/2 hour |
1396 | +elfeed--update-first-time 60)) | 1396 | +elfeed--update-first-time 60)) |
1397 | (+elfeed-update-async-mode -1) ; It really messes with stuff for work | 1397 | (+elfeed-update-async-mode +1) |
1398 | ) | 1398 | (add-hook '+elfeed-update-proceed-hook (defun non-work-hours? () |
1399 | "Return nil if during work hours, t otherwise." | ||
1400 | (let* ((now (current-time)) | ||
1401 | (now* (decode-time now)) | ||
1402 | (work-start* (append '(0 0 8) (cdddr now*))) ; 8:00 AM | ||
1403 | (work-end* (append '(0 0 18) (cdddr now*))) ; 6:00 PM | ||
1404 | (work-start (encode-time work-start*)) | ||
1405 | (work-end (encode-time work-end*))) | ||
1406 | (or (time-less-p now work-start) | ||
1407 | (time-less-p work-end now)))))) | ||
1399 | 1408 | ||
1400 | (setup (:straight elfeed-org) | 1409 | (setup (:straight elfeed-org) |
1401 | (:also-load +org-capture) | 1410 | (:also-load +org-capture) |