cmacrae / spacebar

A minimal status bar for macOS. Ideal for use with tiling window managers like yabai
MIT License
1.22k stars 52 forks source link

Big Sur: shells seem to freeze the entire spacebar #104

Open galbacarys opened 2 years ago

galbacarys commented 2 years ago

Hey all, I'm running into a weird issue: shells seem to freeze the bar entirely!

I have the following very minimal config:

#!/usr/bin/env sh

spacebar -m config title off
spacebar -m config center_shell on
spacebar -m config center_shell command "echo 'it worked'"

echo "done"

and the startup of spacebar freezes. When I switch spaces, the bar doesn't refresh, the center shell just shows "center shell" (not the it worked I'm expecting), and the time doesn't update.

It seems that spacebar is freezing on setting the center_shell_command, and never gets to echo "done". Weirder still, if I invoke these commands manually from the command line rather than in the config file, everything works just fine.

I'm wondering if there's a race condition in Big Sur causing spacebar to freeze up completely if messages are sent too fast, but I'm not really sure. If y'all have any ideas, I'd really appreciate it!

HATTER-LONG commented 2 years ago

I have the same problem on Monterey :(

HATTER-LONG commented 2 years ago

deal it

OneRaynyDay commented 1 year ago

this is unfortunate. Any chance we'll get a patch to fix it for monterey?

anujc4 commented 1 year ago

I had the same issue on MacOS Monterey 12.4. Took me some time to figure out the solution was to tell spacebar the command to run first before turning the shell on. So for your case, this might help:

#!/usr/bin/env sh

spacebar -m config center_shell_command "echo 'it worked'" # set command first
spacebar -m config title off
spacebar -m config center_shell on # then turn the `center_shell` on

echo "done"
dq-dd commented 1 year ago

grab some samples via Activity Monitor while spacebar is hanging
spacebar-samples.tgz