matryer / matryer/xbar-plugins

Pause Plugin Execution - Possible?

Open
#2,091 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
2.6k
Forks
1.1k
Avg merge
9d 15h
Merged PRs (30d)
1

Description

xbar 2.17 beta
MacOS 15.3 Sequoia

I have a .sh plugin running each minute, from times to time it needs to take an action that may take more than 1min. So executions are pilling on top of each other. I've added a lock file handling to it like:

```
_lock="${_this_path}/lockfile.${_this}.off"
if [[ -f "${_lock}" ]]; then
exit 0
fi
```

I'm using a 'wait' instruction for the task so it keeps the current run and I can get some output/results out of it:

```
"${_getInstance}" "${_instanceID}" &
_pid=$!
wait $_pid
return 0
```

however, XBar instantiates a new execution whatsoever, obviously. Is there a way to skip an execution if the previous one hasnt finished yet? Or something like it?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository file, test, or entry point; it only describes a Shell plugin and the lock-file and wait snippets used to avoid overlapping runs. Start by locating xbar's plugin scheduling and execution behavior, then determine whether skipped executions are supported and what test or documented behavior would demonstrate completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.