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

Built-in method for resizing or moving the window under the cursor #206

Open
frantic1048 opened this issue Apr 24, 2024 · 1 comment
Open

Comments

@frantic1048
Copy link

Currently, AeroSpace does not offer a built-in method for resizing or moving the window under the cursor. I have attempted the following methods:

  1. defaults write -g NSWindowShouldDragOnGesture YES: This does not work on macOS 14.4.1 (Sonoma). Additionally, this method does not allow customization of the default modifier key (ctrl + cmd).

  2. Running Yabai with only mouse features (Yabai has built-in support for resizing and moving windows with modifier+mouse). I understand this might seem a bit ridiculous. It did not work: the windows can be moved or resized by Yabai, but it seems that AeroSpace forces them to remain in their original positions.

       # set mouse interaction modifier key
       yabai -m config mouse_modifier cmd
    
       # set modifier + left-click drag to move window
       yabai -m config mouse_action1 move
    
       # set modifier + right-click drag to resize window
       yabai -m config mouse_action2 resize
    
       # disable Yabai window management
       yabai -m rule --add app=".*" manage=off
  3. Trying other tools just for resizing or moving windows, such as easy-move-resize, it works when AeroSpace is not running. However, when AeroSpace is active, it behaves similarly to the Yabai case.

Will it be possible to add this feature to AeroSpace?

BTW, as a lost child from i3wm/swaywm to macOS, AeroSpace gives me the most similar experience to i3wm/swaywm. Thanks for your amazing work! 😘

@nikitabobko
Copy link
Owner

I agree that it'd be nice to have it

For extensibility purposes, I've been thinking about implementing the "grab and move" and "grab and resize" as separate commands

Brainstorming:

[mode.main.binding]
alt-leftMouse = 'grab-and-move --release-on keyup'
alt-rightMouse = 'grab-and-resize --release-on keyup'

It'd allow cool things like:

[mode.main.binding]
alt-g = 'grab-and-move --release-on alt-g' # Press alt-g once to "grab" window. Press alt-g the second time to release it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants