Last active
March 25, 2025 22:49
-
-
Save shiona/bb7c67b9a675d97fd3b8cf590f190021 to your computer and use it in GitHub Desktop.
swaywm mouse capture
This file contains hidden or 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
| # This file is supposed to be a part of swaywm config file (.config/sway/config) | |
| # The format for both lines is: | |
| # bindsym [key combo] exec swaymsg 'input "[mouse identifier from 'swaymsg -t get_inputs']" map_to_output "[monitor from swaymsg -t get_outputs OR * to uncapture"' | |
| bindsym $mod+x exec swaymsg 'input "1133:49970:Logitech_Gaming_Mouse_G502" map_to_output "*"' | |
| bindsym $mod+c exec swaymsg 'input "1133:49970:Logitech_Gaming_Mouse_G502" map_to_output "DP-1"' | |
| # of course you can just run the capture/free from a script and not bother with the key bindings, in that case start from "swaymsg", like: | |
| # swaymsg 'input "1133:49970:Logitech_Gaming_Mouse_G502" map_to_output "DP-1"' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since arma3 on sway doesn't seem to capture mouse even if it's set to full screen, this helps. I guess this might be helpful for other people as well to make sure the mouse does not leave the game to a neighboring monitor.