matryer / xbar

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

Command works with terminal=true but not with terminal=false? #860

Closed gingerbeardman closed 1 year ago

gingerbeardman commented 1 year ago

Notes

Example 1

works

echo "Sync IP | shell='/bin/bash' param1='-c' param2='/Users/matt/.ssh/ip.exp' terminal=true"

does not work

echo "Sync IP | shell='/bin/bash' param1='-c' param2='/Users/matt/.ssh/ip.exp' terminal=false"

Example 2

works

echo "Sync IP | shell='/opt/homebrew/bin/expect' param1='-f' param2='/Users/matt/.ssh/ip.exp' terminal=true"

does not work

echo "Sync IP | shell='/opt/homebrew/bin/expect' param1='-f' param2='/Users/matt/.ssh/ip.exp' terminal=false"

Versions

gingerbeardman commented 1 year ago

Hmm, using Activity Monitor I can see it with terminal=false does seem to run but never finishes.

My command works OK as follows:

bash -c /Users/matt/.ssh/ip.exp

xbar behaviour is puzzling.

gingerbeardman commented 1 year ago

For some reason in the background the expect script timed out, or at least run very slowly.

I replaced its set timeout -1 with set timeout 1 and it runs quickly in the background.

Go figure!