daneah / iterm-components

:computer: Custom status bar components for use with iTerm2
https://www.iterm2.com/3.3/documentation-status-bar.html
MIT License
69 stars 9 forks source link

GitHub Stars fails with a knobs error #16

Open andypiper opened 3 years ago

andypiper commented 3 years ago

When the component is added to the status bar and configured, a ladybug shows in the status bar. Clicking returns this error:

Status bar component “GitHub stars” (engineering.dane.iterm-components.github-stars) failed.

This function call had an error:

statusbar.engineering.dane.iterm_components.github_stars.github_stars_coroutine(knobs:__knobs)

The error was:

Reference to undefined variable “__knobs”. Change it to “__knobs?” to treat the undefined value as null.

I think something has changed with the way this variable is scoped, maybe?

daneah commented 3 years ago

Thanks for the report @andypiper—it's possible the API has changed since I last worked on this! I'll see if I have some time this week to look. If you get curious and find a fix, I'd be happy to accept a pull request as well 😄

andypiper commented 3 years ago

I've been playing with it on-and-off for a while since I based one of my own scripts on yours :-) but I've not worked it out yet. I've been on the verge of heading to the iTerm mailing list for advice, but haven't had the time.

DiegoGiovany commented 3 years ago

Hi guys, any news on it?
I'm trying to get the knob value in the click callback without success...

daneah commented 3 years ago

Hey @DiegoGiovany, unfortunately this project isn't really in much active development these days—I don't even really use the iTerm components feature on a day-to-day basis at present. I definitely don't have bandwidth right now but could try to take a look in, realistically, the next few months.