Created
February 1, 2023 11:29
-
-
Save desaster/77763750d07ffac070457d926c032f2e to your computer and use it in GitHub Desktop.
Disable urgency hints in alacritty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In gnome, urgency hint will cause the window to pop-up in front and steal focus, which is super annoying. | |
On my busy tmux sessions with all kinds of software, urgency hints are triggering from seemingly random stuff. | |
This patch just completely disables the urgency hints in alacritty. | |
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs | |
index 37d28bb9..babeb30f 100644 | |
--- a/alacritty/src/event.rs | |
+++ b/alacritty/src/event.rs | |
@@ -1199,10 +1199,12 @@ impl<N: Notify + OnResize> Processor<N> { | |
TerminalEvent::Wakeup => *processor.ctx.dirty = true, | |
TerminalEvent::Bell => { | |
// Set window urgency. | |
- if processor.ctx.terminal.mode().contains(TermMode::URGENCY_HINTS) { | |
- let focused = processor.ctx.terminal.is_focused; | |
- processor.ctx.window().set_urgent(!focused); | |
- } | |
+ // (Disabled since it's just annyoing, and would have to be disabled for | |
+ // every shell separately) | |
+ // if processor.ctx.terminal.mode().contains(TermMode::URGENCY_HINTS) { | |
+ // let focused = processor.ctx.terminal.is_focused; | |
+ // processor.ctx.window().set_urgent(!focused); | |
+ // } | |
// Ring visual bell. | |
processor.ctx.display.visual_bell.ring(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment