matryer / xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
https://xbarapp.com
MIT License
17.55k stars 643 forks source link

update: xbar doesn't restart after update #631

Open matryer opened 3 years ago

matryer commented 3 years ago

While the in-built restart feature does update the app, when it tries to start the new version and self-terminate, the new version never seems to start.

@leaanthony Did you mention that you had an idea about this?

leaanthony commented 3 years ago

No but I am seeing this behaviour in more recent builds. Pretty certain this used to work

matryer commented 3 years ago

Right now it does this:

  1. Download latest release alongside xbar.app
  2. Unpack the tar to overwrite the existing xbar.app
  3. Start the new app
  4. Wait two seconds and terminate self

I don't know if macOS is preventing multiple versions os xbar from running or something.

Maybe it's better for the code to write a script that will replace the binary and relaunch the app after a delay. Then xbar can quit safely, and the script can take over?

ggrelet commented 3 years ago

I don't know if that's related but the update popup does not have its icon right:

Capture d’écran 2021-03-15 à 14 02 01

If you wish that I open another issue here, let me know.

matryer commented 3 years ago

@leaanthony can you put the icons in so I can edit them pleeeease?

leaanthony commented 3 years ago

Copied, pushed and briefly tested: image

leaanthony commented 3 years ago

Suggestion: Why not put the update notification in the menu? If we want to use "Start at Login", having a dialog flash up is probably not what we want in terms of UX. If it's not obvious enough, we could have a new tray icon indicating an update is available? Something like this: image

or

image

magicus commented 3 years ago

Putting "xbar update available!" in the menu bar would also not be optimal UX :-). But I think that you could change the current "Check for update" to a "Update to xbar v2.0.32", if an update is available. That it, it seems reasonable that the app performs a check for available updates in the background, and makes it clear (but not obnoxiously so) that an update is available.

And possibly that you indicate this fact by adding this text to the main menu. But I'd personally prefer that you just signalled that an update was available, so something like the last screenshot above, but the text being "xbar x2.0.32 available" and in smaller, greyish font, like how the current xbar version is displayed in the xbar menu right now.

matryer commented 3 years ago

Yeah I like this. Maybe an auto-update option too, so it just sorts itself out in the background.

The dialog is annoying.

magicus commented 3 years ago

As long as you can disable the auto update... I hate it when stuff change under your feet, potentially breaking things.