From d23b6c2bc7677ff4c5563512a9a47a1d3179d704 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Wed, 11 May 2022 21:19:27 -0700 Subject: [PATCH] Make floating mpv not steal focus We make the X Class match `__user_requests_float` a wildcard match so it can begin with anything and make mpv launch with the class `mpv__user_requests_float`. Then we make that class `no_focus` in i3. This should prevent focus from jumping to mpv if any of my weird video playing automation scripts launched mpv suddenly. --- .config/i3/config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/i3/config b/.config/i3/config index ba958fa..bc0b390 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -198,4 +198,8 @@ hide_edge_borders both workspace_auto_back_and_forth yes # Make windows created with a special floating class float -for_window [instance="__user_requests_float"] floating enable, border 1pixel, resize set 640 360, sticky toggle +for_window [instance=".?__user_requests_float"] floating enable, border 1pixel, resize set 640 360, sticky toggle + +# Make a floating mpv window not steal focus on open +# This prevents my twitch autotuner from constantly yanking focus +no_focus [instance="mpv__user_requests_float"]