Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknow script output #1

Closed
ThomasF34 opened this issue Oct 2, 2019 · 6 comments
Closed

Unknow script output #1

ThomasF34 opened this issue Oct 2, 2019 · 6 comments

Comments

@ThomasF34
Copy link

Hi,

I just installed your widget and in the desktop infos (on the left) i have an error :
Error : unknown script output

image

I looked at both primary and secondary spaces scripts and ran them manually. Primary printed a correct result but secondary did not, saying it could not locate the given display.

In spaces-secondary.sh I replaced this line by :

SPACES=$(yabai -m query --spaces --display)

But i still have the same error. Do you know what's causing this ?

Thanks

@shagia
Copy link

shagia commented Oct 29, 2019

Went through this because I'm super interested myself, it looks like you require jq to pass-through the parsed JSON data.

Install Homebrew if you haven't and brew install jq, after that you'd probably want to remove spaces-secondary.jsx from the active folder if you aren't using a secondary monitor, and give spaces-primary.jsx a refreshFrequency relative towards what won't drain your battery.

@kkga
Copy link
Owner

kkga commented Nov 19, 2019

Primary printed a correct result but secondary did not, saying it could not locate the given display.

The "spaces-secondary" widget prints out workspaces from a secondary connected monitor. If you don't have one, it will print out an error, so you should just disabled it from the uebersicht menu.

@kkga
Copy link
Owner

kkga commented Nov 19, 2019

and give spaces-primary.jsx a refreshFrequency relative towards what won't drain your battery.

Alternatively, use yabai's signals to trigger refreshing specific uebersicht widgets. I've just added more info on that in the README: https://github.com/kkga/nibar#usage

@rublev
Copy link

rublev commented Jan 22, 2020

and give spaces-primary.jsx a refreshFrequency relative towards what won't drain your battery.

Alternatively, use yabai's signals to trigger refreshing specific uebersicht widgets. I've just added more info on that in the README: https://github.com/kkga/nibar#usage

This no longer works for whatever reason. I got the bar working with spaces by changing the refreshrate but adding the yabai spaces-changed signal isn't working.

See my comments in koekeishiya/yabai#381

None of these work:

# ubersicht="$(ps ax | grep sicht | awk '{print $5}' | head -1 | cut -d/ -f3 | cut     -d. -f1)"
# echo $ubersicht
# refresh primary display workspaces
# yabai -m signal --add event='space_changed' action="ru"

# refresh my Übersicht bar when the space changes
# yabai -m signal --add event='space_changed' \
#     action="osascript -e 'tell application \"'$(ps ax | grep sicht | awk '{print $5}' | head -1 | cut -d/ -f3 | cut -d. -f1)'\" to refresh'"

# yabai -m signal --add event=space_changed action="osascript -e 'display notification \"active space changed.\" with title \"yabai\" subtitle \"signal\"'"
# yabai -m signal --add event=space_changed action="osascript -e 'tell application $(ps ax | grep sicht | awk '{print $5}' | head -1 | cut -d/ -f3 | cut -d. -f1) to refresh'"
# refresh primary display workspaces
# yabai -m signal --add event=space_changed \
#     action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"

# yabai -m notification trigger=space-changed \
    # action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"yabai-space-widget\"'"
# yabai -m signal --add event=space_changed action="osascript -e 'display notification \"active space changed.\" with title \"yabai\" subtitle \"signal\"'"

@kkga
Copy link
Owner

kkga commented Jan 23, 2020

here's what I have in .yabairc:

yabai -m signal --add event=space_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"
yabai -m signal --add event=window_focused \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"
yabai -m signal --add event=space_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'"
yabai -m signal --add event=window_focused \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'"

It works perfectly in my case.

  • yabai-v2.2.2
  • Übersicht 1.4 (61)

What do you see when running 👇 this command directly in a terminal?

osascript -e 'tell application "Übersicht" to refresh widget id "nibar-spaces-primary-jsx"'

@rublev
Copy link

rublev commented Jan 23, 2020

here's what I have in .yabairc:

yabai -m signal --add event=space_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"
yabai -m signal --add event=window_focused \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"
yabai -m signal --add event=space_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'"
yabai -m signal --add event=window_focused \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'"

It works perfectly in my case.

* yabai-v2.2.2

* Übersicht 1.4 (61)

What do you see when running 👇 this command directly in a terminal?

osascript -e 'tell application "Übersicht" to refresh widget id "nibar-spaces-primary-jsx"'

Hey thanks for the quick reply! I get:

$ osascript -e 'tell application "Übersicht" to refresh widget id "nibar-spaces-primary-jsx"'
32:46: syntax error: A identifier can’t go after this identifier. (-2740)
$ osascript -e 'tell application \"Übersicht\" to refresh widget id "nibar-spaces-primary-jsx"'
17:18: syntax error: Expected expression, property or key form, etc. but found unknown token. (-2741)
rublev@andreis-MacBook-Pro ~ %

I tried the commands you listed as well and changed refreshRate to false in the JSX file but it didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants