CurrentCycleItem returns the Item related to the current cycle.
()
| 274 | |
| 275 | // CurrentCycleItem returns the Item related to the current cycle. |
| 276 | func (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 | |
| 286 | func (p *Plugin) runInTerminal(appleScriptTemplate3, command, paramsStr string, vars []string) error { |
| 287 | tpl, err := template.New("appleScriptTemplate3").Parse(appleScriptTemplate3) |
no outgoing calls