MCPcopy
hub / github.com/matryer/xbar / CurrentCycleItem

Method CurrentCycleItem

pkg/plugins/plugin.go:276–284  ·  view source on GitHub ↗

CurrentCycleItem returns the Item related to the current cycle.

()

Source from the content-addressed store, hash-verified

274
275// CurrentCycleItem returns the Item related to the current cycle.
276func (p *Plugin) CurrentCycleItem() *Item {
277 if len(p.Items.CycleItems) == 0 {
278 return nil
279 }
280 if p.CycleIndex > len(p.Items.CycleItems)-1 {
281 p.CycleIndex = 0
282 }
283 return p.Items.CycleItems[p.CycleIndex]
284}
285
286func (p *Plugin) runInTerminal(appleScriptTemplate3, command, paramsStr string, vars []string) error {
287 tpl, err := template.New("appleScriptTemplate3").Parse(appleScriptTemplate3)

Callers 3

TestCycleItemsFunction · 0.95
TriggerRefreshMethod · 0.95
updateLabelMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestCycleItemsFunction · 0.76