nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
7.49k stars 119 forks source link

Detect when AeroSpace.app needs to be restarted (after update) and show a red bubble in the tray icon #352

Open alper opened 3 months ago

alper commented 3 months ago

I'm not sure what changed here. I think Zed is definitely fiddling around with their rendering, but no idea why Mail.app would suddenly not be caught anymore.

nikitabobko commented 3 months ago

Blind guess: if you try to run aerospace -v in CLI you will see that CLI client and AeroSpace.app versions are different. Which means that you updated aerospace package via brew but didn't do AeroSpace.app restart.

In that case, macOS ax API stops notifying AeroSpace about newly appeared windows 🤷

Related: https://github.com/nikitabobko/AeroSpace/issues/237#issuecomment-2184114928

alper commented 3 months ago

That was indeed the issue.

Can the tray icon pop a red bubble when this happens?

Can it be prevented entirely?

nikitabobko commented 3 months ago

I don't know if it can be reliably detected, but I will think about it

jakenvac commented 2 months ago

@nikitabobko If we could get proper launchd integration working (see #479) you could restart the service when it's executable changes using WatchPaths. There are some docs for WatchPath here, but you'll have to navigate to configuration and scroll to WatchPaths. The site doesn't really have any way to link to things.

Perhaps some work around app lifecycle management could solve a few issues.

nikitabobko commented 2 months ago

@jakenvac do you mean that we could rerun AeroSpace.app if it changes? Well, right now, tiling tree structure and windows workspace assignment is not resistant to AeroSpace.app restarts

jakenvac commented 2 months ago

That's what I meant, yeah. But you raise a good point. I hadn't thought of that.