xbar-plugins icon indicating copy to clipboard operation
xbar-plugins copied to clipboard

Why my script shows nothing in xbar but success in terminal

Open p1k0pan opened this issue 2 years ago • 4 comments

my script easily print current yabai space label

#!/usr/bin/env bash
PATH=$PATH:/usr/local/bin
space=$(yabai -m query --spaces --space | jq ".label")
echo ${space}

The xbar on menubar turns to blank and show nothing. This script running ok in terminal.

I have also test echo "test" work on xbar.

Maybe I miss something?

p1k0pan avatar Mar 20 '22 08:03 p1k0pan

Can confirm - output works on the terminal but doesn't show when used in the plugin.

braun-steven avatar Mar 24 '22 09:03 braun-steven

I fixed it by modifying PATH=$PATH:/usr/local/bin to PATH=$PATH:/usr/local/bin:/opt/homebrew/bin.

braun-steven avatar Mar 24 '22 09:03 braun-steven

Hi, I've got a similar issue. The result print correctly in bash but not in the menubar.

Do you have a solution for this ?

SnowRocket74 avatar Aug 17 '22 10:08 SnowRocket74

Sry I don't even using Xbar for now. If just want to know the number of current space, I use SpaceId for mac without any configuration

p1k0pan avatar Aug 17 '22 15:08 p1k0pan