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

Application didn't launch error msg even though it did (Alacritty) #4

Open
tlvenn opened this issue Feb 18, 2024 · 7 comments
Open

Comments

@tlvenn
Copy link

tlvenn commented Feb 18, 2024

Hi,

Trying to use Scratchpad and whatever I am trying it with (target title vs app), the command always spawn the floating window properly but does not manage to detect it did.

thread 'main' panicked at src/scratchpad.rs:67:21:
Application didn't launch within timeout period!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Any idea what the issue might be ?
Thanks in advance.

Env: Sonoma 14.3 / Yabai 6.0.12

@tlvenn
Copy link
Author

tlvenn commented Feb 18, 2024

This seems to happen only with the launch_type command. I tried the example with Discord app and the command returns properly however when I execute the command again, it does not hide away the discord scratchpad.

@tlvenn
Copy link
Author

tlvenn commented Feb 18, 2024

My alacritty test config

[[scratchpad]]
name = "alacritty"
target_type = "title"
target = "AlacrittyScratchpad"
position = [290, 175]
size = [1100, 700]
launch_type = "command"
launch_command = "/etc/profiles/per-user/tlvenn/bin/alacritty --title AlacrittyScratchpad"

@tlvenn
Copy link
Author

tlvenn commented Feb 18, 2024

Ha ignore the Discord issue, did not realize the test was done on which window has the focus and I am triggering the command from a terminal instead of skhd so of course discord loose the focus..

@tlvenn
Copy link
Author

tlvenn commented Feb 18, 2024

If i query yabai myself, it does not return Alacritty even though there is a floating alacritty window on the space which explains why Scratchpad fails to see it as well I guess.

❯ yabai -m query --windows | jq '.[].app'
".kitty-wrapped"
".kitty-wrapped"
"Discord"
"Floorp"

If i start Alacritty manually and toggle it to float then yabai sees it properly:

❯ yabai -m query --windows | jq '.[].app'
"Alacritty"
".kitty-wrapped"
".kitty-wrapped"
"Discord"
"Floorp"

@arpandaze
Copy link
Owner

arpandaze commented Feb 18, 2024

Thanks for reporting the issue @tlvenn. Seems like you are using self compiled alacritty. I just tested multiple configurations. Only case that I fould when yabai fails to detect alacritty window is when launching alacritty binary compiled with make binary. Running binary inside of Alacritty.app works but not standalone binary for some reason.

This Works:
Compiled with: make app
Config:

[[scratchpad]]
name = "alacritty"
target_type = "title"
target = "AlacrittyScratchpad"
position = [290, 175]
size = [1100, 700]
launch_type = "command"
launch_command = "**/alacritty/target/release/osx/Alacritty.app/Contents/MacOS/alacritty --title AlacrittyScratchpad"

This Doesn't:
Compiled with: make binary
Config:

[[scratchpad]]
name = "alacritty"
target_type = "title"
target = "AlacrittyScratchpad"
position = [290, 175]
size = [1100, 700]
launch_type = "command"
launch_command = "**/alacritty/target/release/alacritty --title AlacrittyScratchpad"

@arpandaze
Copy link
Owner

It appears to be Alacritty issue as suggested by yabai's creator in this thread: koekeishiya/yabai#1250 (comment)

@tlvenn
Copy link
Author

tlvenn commented Feb 18, 2024

Ha good finding ! Ya I use Nix so it's indeed self compiled. The good news is I actually use Kitty, was merely trying to check the examples with Alacritty to make sure I was not making a mistake somewhere and I probably was given that now I can make everything works with Kitty.

Super happy, awesome to have scratchpads with kitty and yazi, thanks for this project.

@tlvenn tlvenn changed the title Application didn't launch error msg even though it did Application didn't launch error msg even though it did (Alacritty) Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants