From 5ed26881495a603c169effda4cf794a3c2797d8a Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 4 May 2021 23:25:35 -0500 Subject: Add unfocused --- init.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 07f856c..e25f955 100644 --- a/init.el +++ b/init.el @@ -295,8 +295,9 @@ (auto-save-visited-mode +1) - (when-unfocused save-some-buffers - (save-some-buffers t))) + (add-hook 'unfocused-hook + (defun unfocused@save-buffers () + (save-some-buffers t)))) (setup flyspell (setq-default ispell-program-name "hunspell" @@ -330,8 +331,8 @@ nil 'client) " Client"))) window-resize-pixelwise t) - (when-unfocused garbage-collect - (garbage-collect))) + + (add-hook 'unfocused-hook #'garbage-collect)) (setup gnus (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) @@ -979,6 +980,11 @@ if ripgrep is installed, otherwise `consult-grep'." (global-undo-fu-session-mode +1)) +(setup (:straight (unfocused + :host github + :repo "duckwork/unfocused")) + (unfocused-mode +1)) + (setup (:straight (vertico :host github :repo "minad/vertico")) -- cgit 1.4.1-21-gabe81