From f65f4387b8f196f63ec78189b69bb337c1c558f3 Mon Sep 17 00:00:00 2001
From: Case Duckworth
Date: Mon, 28 Feb 2022 09:40:24 -0600
Subject: Fix elfeed-update-async niceness

---
 lisp/+elfeed.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'lisp')

diff --git a/lisp/+elfeed.el b/lisp/+elfeed.el
index 85d9c3b..ac316c4 100644
--- a/lisp/+elfeed.el
+++ b/lisp/+elfeed.el
@@ -40,6 +40,10 @@
 
 (defvar +elfeed--update-running nil "Whether an update is currently running.")
 (defvar +elfeed--update-count 0 "How many times `+elfeed-update-command' has run.")
+(defcustom +elfeed-update-niceness 15
+  "How \"nice\" `+elfeed-update-command' should be."
+  :type 'integer
+  :group 'elfeed)
 
 (defun +elfeed-update-command ()
   (interactive)
@@ -104,7 +108,10 @@
       (message update-message-format "start")
       (set-process-sentinel (start-process-shell-command
                              "Elfeed" "*+elfeed-update-background*"
-                             (format "nice -%d %s %s" 15 "emacs -Q --script" script))
+                             (format "nice -n %d %s %s"
+                                     +elfeed-update-niceness
+                                     "emacs -Q --script"
+                                     script))
                             (lambda (proc stat)
                               (advice-remove 'elfeed #'+elfeed--update-message)
                               (setq +elfeed--update-running nil)
-- 
cgit 1.4.1-21-gabe81