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.
This commit is contained in:
Trysdyn Black 2022-05-17 14:54:03 -07:00
parent d383663609
commit 7da8259dcd

View file

@ -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
}