Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window control scripts broken for multiple displays and resolutions #14

Closed
lu0 opened this issue May 7, 2022 · 1 comment
Closed

Window control scripts broken for multiple displays and resolutions #14

lu0 opened this issue May 7, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lu0
Copy link
Owner

lu0 commented May 7, 2022

Describe the bug
Scripts to tile and maximize windows using keybindings work well with a single display, but not for multiple displays.

To Reproduce
Steps to reproduce the behavior:

  1. Let's assume we have at least one extra display attached to the machine, other than the built-in one.
  2. Let's say the mouse is located in a window placed in the second monitor.
  3. Trigger any keybinding set to tile or maximize the raised window: Alt + ( a, w, d, s, z, q, e, c or spacebar).
  4. The window is tiled in the built-in display rather than the one the mouse is currently in. It is sometimes tiled in weird positions and not the intended one.

Expected behavior
The window should be tiled in the correct position with the correct gaps (up, left, right, bottom, up-left, up-right, etc) and in the display/monitor the mouse is currently in.

Desktop (please complete the following information):

  • OS: [Linux Mint 20]
  • Desktop Environment: [Cinnamon 4.6.7]
  • Shell [Bash 5.0.16]
  • Repository version [current master (up to 522571f)]

Additional context
These scripts should also support any resolution.

@lu0 lu0 added the bug Something isn't working label May 7, 2022
@lu0 lu0 self-assigned this May 7, 2022
@lu0 lu0 added this to To do in Preparation for CI/CD & Misc TO-DOs via automation May 7, 2022
@lu0 lu0 added this to To do in Repository Maintenance via automation May 7, 2022
@lu0 lu0 changed the title Window control scripts broke for multiple displays and resolutions Window control scripts broken for multiple displays and resolutions May 7, 2022
@lu0 lu0 moved this from To do to In progress in Repository Maintenance May 8, 2022
lu0 added a commit that referenced this issue May 9, 2022
lu0 added a commit that referenced this issue May 9, 2022
- TODO: Center mouse in window
    - will need to refactor `toggle_mouse_position` to make mouse and
    wmctrl functions their own libraries or modules.
@lu0
Copy link
Owner Author

lu0 commented May 9, 2022

Multiple displays and resolutions are now (0311ef6) supported in window-control scripts. But further enhancement is required to make the mouse follow the new position of the window, since I'm using Cinnamon's sloppy focus mode (windows are activated on mouse hover):

Window settings for Cinnamon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant