-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat(desktop): spawn app where cursor is #129
base: develop
Are you sure you want to change the base?
Conversation
Great work! Let me try. |
CI is failing because of Mac only code. I am trying to fix. |
apps/desktop/src-tauri/src/lib.rs
Outdated
@@ -209,6 +209,7 @@ pub fn run() { | |||
.unwrap(); | |||
}) | |||
.setup(move |app| { | |||
app.set_activation_policy(ActivationPolicy::Accessory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. I think wrapping this up with #[cfg(target_os = "macos")]
should be enough. Good thing we have CI now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already did, fixing another bug from adding the new config field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think changing the default showOnCursorPosition
value to true is a better.
The beta build CI just finished. https://github.com/kunkunsh/kunkun/actions/runs/13383208119 |
I tried on Mac using 2 monitors with different scaling factors. Probably some inconsistencies between platforms. I'll check today |
My Ubuntu 24 is also broken after switching from x11 to wayland. So I can't test on Linux for now. |
just tested out the MacOS 14 beta build, working beautifully! |
This PR works for mac but doesn’t work well on windows. |
This PR addresses #123 and introduces new logic where window follows cursor (like Raycast does). New config entry is present to enable toggling this feature on and off.
For now window is spawned in the middle of current screen. Probably a more sophisticated implementation exists