FR: Launch a custom Shortcut on any process (right click, maybe menu bar)
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
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.
- launching a custom performance profiler script
- gdb attach
- custom renicing the process priority
- launch dtruss/fs_usage/dtrace/opensnoop/execsnoop/iosnoop/sc_usage/ktrace/trace on process
- send user-defined / process-specific signal to process
- launch graceful shutdown script (send signal X, wait for Y seconds, if pid still exists after some time, kill -9)
sudo taskpolicy -b -p <pid>lldb -p <pid>- core snapshot on pid (
gcore) - 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.