-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Query mouse position / Query mouse display #644
Comments
On the latest master you can use the
The above are some examples of what you can do with these. |
This is exactly what I was searching for. Already excited for the release. Until then, I will use my workaround cli. |
Yesterday I discovered yabai and I already love it. I now can replace TotalSpaces 2. I just needed a simple way to switch displays without any animation and until yesterday ts2 was my only option.
For my purpose, I implemented this small script: https://raw.githubusercontent.com/TheNoim/MacOS/master/yabai-functions.sh
With this script, I can cycle through my spaces on the current desktop. It works great in combination with keyboard shortcuts. It has just one flaw. With yabai I am only able to query the currently focused display. However, sometimes I trigger my space switch shortcut when I am just hovering over my second monitor. A workaround is to use
yabai -m config focus_follows_mouse autoraise
. But I don't want to focus, I just want to change spaces. I would need an additional field in the json. Something like this:Then I could update the getCurrentDisplay function to:
Temporary dirty solution:
Use a small swift cli utility https://github.com/TheNoim/MacOS/blob/master/mousePosition/mousePosition/main.swift in combination with
echo $(yabai -m query --displays | jq --argjson display "$displayID" 'map(select(.id == $display)) | .[0].index')
The text was updated successfully, but these errors were encountered: