emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/auto-dim-other-buffers fb7ea24922 26/82: dimming/undimming


From: ELPA Syncer
Subject: [nongnu] elpa/auto-dim-other-buffers fb7ea24922 26/82: dimming/undimming when gaining/losing app focus
Date: Mon, 12 Dec 2022 20:58:39 -0500 (EST)

branch: elpa/auto-dim-other-buffers
commit fb7ea24922ca38c7895cf992b0bb3458f2d914fe
Author: justin talbott <justin@waymondo.com>
Commit: justin talbott <justin@waymondo.com>

    dimming/undimming when gaining/losing app focus
    
    This will dim all windows when you lose focus of Emacs 24.4+ and undim
    the active buffer when you gain focus back. It's helpful for something
    like a multi-monitor setup where you need to know which screen's app
    currently has focus.
---
 auto-dim-other-buffers.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/auto-dim-other-buffers.el b/auto-dim-other-buffers.el
index 95f487dc21..f57192b67d 100644
--- a/auto-dim-other-buffers.el
+++ b/auto-dim-other-buffers.el
@@ -56,6 +56,8 @@
 (defun turn-off-auto-dim-other-buffers ()
   (remove-hook 'pre-command-hook 'adob/pre-command-hook)
   (remove-hook 'post-command-hook 'adob/post-command-hook)
+  (remove-hook 'focus-out-hook 'adob/dim-all-windows)
+  (remove-hook 'focus-in-hook 'adob/after-change-major-mode-hook)
   (remove-hook 'after-change-major-mode-hook 
'adob/after-change-major-mode-hook)
   (remove-hook 'next-error-hook 'adob/after-change-major-mode-hook)
   (adob/undim-all-windows))
@@ -65,6 +67,8 @@
   (adob/dim-all-windows)
   (add-hook 'pre-command-hook 'adob/pre-command-hook)
   (add-hook 'post-command-hook 'adob/post-command-hook)
+  (add-hook 'focus-out-hook 'adob/dim-all-windows)
+  (add-hook 'focus-in-hook 'adob/after-change-major-mode-hook)
   (add-hook 'after-change-major-mode-hook 'adob/after-change-major-mode-hook)
   (add-hook 'next-error-hook 'adob/after-change-major-mode-hook))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]