From 7da8259dcd98385f9d981ce5f5d7a4a7e9924cd4 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Tue, 17 May 2022 14:54:03 -0700 Subject: [PATCH] Make i3 config work on Sway This may not be a backward compatible change, hopefully it won't matter. We add the directive to handle floating windows via app_id as well as window class, since Wayland doesn't use window classes, and we add a directive to let Sway turn off mouse acceleration. --- .config/i3/config | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 303d786..a070c8d 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -201,8 +201,18 @@ 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 - -# Make a floating mpv window not steal focus on open -# This prevents my twitch autotuner from constantly yanking focus +# For the moment I'm expressing directives for both i3 and sway here; i3 may fail on these +for_window [instance=".*__user_requests_float"] floating enable, sticky enable, border pixel 1, resize set 800 600 +for_window [app_id=".*__user_requests_float"] floating enable, sticky enable, border pixel 1, resize set 800 600 no_focus [instance="mpv__user_requests_float"] +no_focus [app_id="mpv__user_requests_float"] + +# Make floating mpv specifically go in the corner +for_window [instance="mpv__user_requests_float"] resize set 640 360, move position 1280 20 +for_window [app_id="mpv__user_requests_float"] resize set 640 360, move position 1280 20 + +# Set mouse acceleration to 0 in Sway +input "virtual pointer" { + accel_profile "flat" + pointer_accel 0.0 +}