yabai
yabai copied to clipboard
Add more options for mouse actions
This pull request makes two main changes:
- Add
move2
option to mouse actions, which uses a less performant approach but which does not rely on scripting-addition, as detailed here. - Allow mouse action modifiers to be composed, using
+
as a delimiter, for examplecmd+shift+fn
. Also providessuper
forcmd+alt+shift+ctrl
.
I'm not interested in adding non-sip support in places where sip offers a better experience. I'll leave this PR open so that it is easier for people to see and they can merge it themselves in a fork/clone if they want to.
I might look into finishing the support for multiple modifiers in mouse_modifier in the future.
Awesome! Looking forward to this release as I was literally just searching for this feature. Just wanted to drop in and say that I really appreciate all of the work you do on this project!
@aws-nlaquet just so you know koekeishiya isn't merging this particular pull request as my approach doesn't quite align with his. Not sure of the timeline for multiple modifier keys in the official branch, but if you want them now you can install my fork (which I try to keep up to date with upstream) :)
Nice. Since qmk doesn't support mapping to fn, this feature is critical to me... Thanks a lot to both you and @koekeishiya in advance and looking forward to the release!
I'm not interested in adding non-sip support in places where sip offers a better experience. I'll leave this PR open so that it is easier for people to see and they can merge it themselves in a fork/clone if they want to.
I might look into finishing the support for multiple modifiers in mouse_modifier in the future.
Would you at least be interested in reducing the areas where SIP is required? Lots of us use corporate laptops and disabling SIP is not an option...
What is the workaround now officially?
I'll look into this a bit in the near future, considering the original plans I had (and have mentioned before) are far in the future if ever.
I've been thinking about how to approach this, and these are my thoughts so far:
The current system may lack in flexibility in terms of customization, but it is well designed and makes sense in my opinion. The features that are there complement each other well. Let's break down why:
- The mouse_modifier defines a key which is required to do mouse interactions.
- This mouse_modifier amplifies the focus-follows-mouse functionality, acting as a way to temporarily disable it while reaching for the menubar or just otherwise skipping activation while the user moves the mouse for whatever reason.
- When mouse_modifier is combined with left or right mouse-buttons, it triggers the action associated through mouse_action1/2.
- mouse_drop_action is clearly separate from the "button" actions.
The syntax for achieving the above is simple and clean, in my opinion. Now I do agree that the functionality supported by this design may be lacking.
I am unable so far to come up with a design that I think is good, that still allows for the interoperability with mouse_modifier and focus-follows-mouse, while still allowing the full flexibility for having multiple modifiers, re-using the same mouse-button with different modifiers, and having the drop_action change based on modifier etc.
I could obviously implement this functionality in code without any problem, but I do care about the design; what the interface looks like, and how each part of the funcitonality complements (or contradicts) other parts.
Note that none of the mouse_actions require SIP to be disabled in todays version of yabai, so this is strictly about the ability to have multiple modifier keys as mouse_modifier, have separate mouse_modifiers for move/resize, separate mouse_modifier for mouse_drop_action stack/swap at the same time, ability to use separate modifiers for move/resize with the same mouse button etc.