| Crates.io | focus_by_cursor |
| lib.rs | focus_by_cursor |
| version | 0.1.0 |
| created_at | 2025-05-29 11:08:27.670103+00 |
| updated_at | 2025-05-29 11:08:27.670103+00 |
| description | Automatically focuses the yabai window under the mouse cursor, without clicks. Works exclusively on macOS. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1693686 |
| size | 19,539 |
macOS only: This tool works exclusively on macOS with yabai installed.
Automatically focuses the yabai window under your mouse cursor, without clicks.
Homebrew installed (see https://brew.sh).
yabai (tiling window manager) installed and running:
brew install koekeishiya/formulae/yabai
Accessibility permissions for yabai:
/opt/homebrew/bin/yabai, and click Open.Input Monitoring permissions for focus_by_cursor binary:
/usr/local/bin/focus_by_cursor, and click Open.Clone the repository:
git clone https://github.com/kastastin/focus_by_cursor.git
cd focus_by_cursor
Build in release mode:
cargo build --release
Install to your PATH:
sudo mv target/release/focus_by_cursor /usr/local/bin/focus_by_cursor
sudo chmod +x /usr/local/bin/focus_by_cursor
Verify installation:
which focus_by_cursor # should print /usr/local/bin/focus_by_cursor
Run the listener:
focus_by_cursor
The program will listen for mouse moves and focus windows under the cursor.
Press Ctrl+C to stop.
rdev.yabai for all windows (yabai -m query --windows).yabai -m window --focus <id>.