ProcessSpy-public icon indicating copy to clipboard operation
ProcessSpy-public copied to clipboard

FR: Launch a custom Shortcut on any process (right click, maybe menu bar)

Open mike-clark-8192 opened this issue 5 months ago • 2 comments

Is your feature request related to a problem? Please describe what you're trying to achieve.

It would unlock a lot of power-user functionality to be able to on-demand launch a configured custom shortcut (or than one!) on a selected process. It should at the very least pass the pid to the Shortcut, since everything else about the process can be gathered using just that info. But process name and other basic metadata might be nice too.

Describe the solution you'd like

It'd be pretty similar to the existing Shortcut integration functionality.

Additional context N/A

mike-clark-8192 avatar Jun 26 '26 21:06 mike-clark-8192

Thanks for the suggestion! This sounds interesting. Could you share a bit more about your workflow? Specifically, what would your Shortcut do with the PID (or process information)? Understanding the use case will help determine the best way to implement this.

robert-v avatar Aug 07 '26 12:08 robert-v

  1. launching a custom performance profiler script
  2. gdb attach
  3. custom renicing the process priority
  4. launch dtruss/fs_usage/dtrace/opensnoop/execsnoop/iosnoop/sc_usage/ktrace/trace on process
  5. send user-defined / process-specific signal to process
  6. launch graceful shutdown script (send signal X, wait for Y seconds, if pid still exists after some time, kill -9)
  7. sudo taskpolicy -b -p <pid>
  8. lldb -p <pid>
  9. core snapshot on pid (gcore)
  10. scripted interaction with an app process through accessibility APIs (NSRunningApplication(processIdentifier:) -> ...)

tbh I'd prefer being able to define my own list of custom shell scripts to accomplish this. I'm not sure why I asked for Shortcuts (I mean, Shortcuts can launch shell scripts, so... but... whatever.) Either one works.

mike-clark-8192 avatar Aug 08 '26 18:08 mike-clark-8192