felixhageloh / uebersicht

ˈyːbɐˌzɪçt
GNU General Public License v3.0
4.56k stars 166 forks source link

How to find the widget id for specific widget? #511

Closed yuchen-lea closed 1 year ago

yuchen-lea commented 1 year ago

Thanks for this great work! I'm trying to use apple script to control Uebersicht, refreshing all widgets works:

osascript -e 'tell application id "tracesOf.Uebersicht" to refresh' 

But refreshing widget with id doesn't. I guess I didn't get the correct id.

For example, I want to control this widget:

图片

and it was located in …/Übersicht/widgets/particals.widget/index.js

I tried following, but none of them worked:

osascript -e 'tell application id "tracesOf.Uebersicht" to refresh widget id "particles"'
osascript -e 'tell application id "tracesOf.Uebersicht" to refresh widget id "particles-widget-index-js"'
osascript -e 'tell application id "tracesOf.Uebersicht" to refresh widget id "particles-js"'
osascript -e 'tell application id "tracesOf.Uebersicht" to refresh widget id "particles-index-js"'

Environments:

ajrosen commented 1 year ago

So close! Refresh is for all widgets, reload is for an individual widget.

osascript -e 'tell application id "tracesOf.Uebersicht" to reload widget id "particles-widget-index-js"'

yuchen-lea commented 1 year ago

@ajrosen Oh, thank you sooooooooo much! Maybe we could update the readme?

图片

refresh widget id doesn't work for me, reload widget id works. But I'm not sure, since I've seen several cases in which people use refresh widget id Übersicht seems to hang / stop responding to osascript commands after waking from sleep · Issue #496 · felixhageloh/uebersicht refreshing specific widget ids only works with coffee files and not jsx ones · Issue #439 · felixhageloh/uebersicht