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.
This commit is contained in:
Trysdyn Black 2022-05-11 21:19:27 -07:00
parent f00a861b11
commit d23b6c2bc7

View file

@ -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"]