Skip to content
English

Hear clicks

Pixling is preparing for Mac App Store release. Join the waitlist on pixling.app to hear when it launches.

Let your script react whenever the user clicks its resident. pixling resident events streams one JSON line per click while it runs. Pixling keeps no backlog, so clicks while nothing is listening are not delivered.

Start streaming events from your resident:

Terminal
pixling resident events --to client:my-agent/conversation-1

Click the resident to watch lines arrive in Terminal, and press Ctrl+C to stop.

Event line When it prints
{"event":"click"} Every plain click on the resident while listening.
{"event":"ended","reason":"residentStowed"} When the resident is put away; the command then exits 0.

Pipe pixling resident events into a shell loop to run your own action on each click:

Terminal
pixling resident events --to client:my-agent/conversation-1 --exclusive |
while read -r line; do
case "$line" in
'{"event":"click"}') pixling message send --to client:my-agent/conversation-1 --text "You clicked me" ;;
esac
done
Mode Resident’s click reaction and shortcut Hover reaction Delivered to your script
Default (no flag) Plays and opens as usual Unchanged Yes
--exclusive Suppressed while your script listens Unchanged Yes
  • Only a plain click on the resident counts. Pixling does not watch other input, other residents, or other apps.
  • The loop ends when the resident is put away or when you stop the pipeline.
  • Stopping the pipeline with Ctrl+C restores normal click behavior right away.