Skip to content

Pause Plugin Execution - Possible? #934

Open
@fm4tt0s

Description

@fm4tt0s

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions