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

Add mouse option to WINDOW_SEL #66

Closed
dominiklohmann opened this issue Jun 24, 2019 · 7 comments
Closed

Add mouse option to WINDOW_SEL #66

dominiklohmann opened this issue Jun 24, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@dominiklohmann
Copy link
Collaborator

dominiklohmann commented Jun 24, 2019

Proposal

Add a cursor mouse option to WINDOW_SEL, so that the focus, swap and warp window commands can interact with the window under the cursor mouse.

This is mostly useful with ffm disabled, but focusing the window under the cursor mouse may also be useful on some signals, e.g. window_destroyed.

@koekeishiya koekeishiya added the enhancement New feature or request label Jun 24, 2019
@koekeishiya
Copy link
Owner

Does mouse, cursor or pointer make the most sense? I personally find cursor / pointer to be better than mouse, but considering the other options use mouse, would it be better to use that here as well, for consistency?

@dominiklohmann
Copy link
Collaborator Author

Mouse is probably better for consistency, while cursor would be technically more correct.

So mouse it is, because consistency in the command line interface is important.

@dominiklohmann dominiklohmann changed the title Add cursor option to WINDOW_SEL Add mouse option to WINDOW_SEL Jun 24, 2019
koekeishiya added a commit that referenced this issue Jun 24, 2019
@koekeishiya
Copy link
Owner

koekeishiya commented Jun 24, 2019

New value added to the definition of WINDOW_SEL: mouse.

yabai -m window --focus mouse
yabai -m window --swap mouse
yabai -m window --warp mouse

@koekeishiya koekeishiya added the addressed on master; not released Fixed upstream, but not yet released label Jun 24, 2019
@dominiklohmann
Copy link
Collaborator Author

Awesome. Added it to the wiki already.

I've now been using the below snippet for 5 minutes and love it already. Fixes issues with closing floating windows quite smoothly in my opinion.

yabai -m signal --add event=window_destroyed \
        action="yabai -m window --focus mouse"

@koekeishiya
Copy link
Owner

This signal system actually has way more potential than I originally realized during its development, especially considering how easy it was to implement. Overall I am much more satisfied with how yabai is structured / organized than I ever was with chunkwm. Guess third time's the charm.

@dominiklohmann
Copy link
Collaborator Author

Yeah, I've recently realised that I can just split my config into multiple files and reload selected files on certain signals. This has made my setup so much better, it's almost unreal. Gotta publish my dotfiles sometime to show off all these scripts I made already.

@goranmoomin
Copy link

@dominiklohmann Wow the lazy-load of config is a great idea! What about making a ‘Tips & Tricks’ in a wiki and adding some config ideas... (especially ones that use signals)

Sent with GitHawk

@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants