morassman/process-palette

Add hook for keyboard shortcut to kill process currently running and in focus

eddyc opened this issue · 4 comments

eddyc commented

Hi,
As the title says, would it be possible to add a hook to attach a keyboard shortcut to the focused running process's 'Stop/Discard' button. Sometimes processes may run too long and it would be nice to be able to kill them quickly without using the mouse pointer.

Yes. That would be quite straight forward. With my package development in general though, I've started to move away from defining shortcut keys for the commands that the package defines. With so many other packages out there it's quite easy for a shortcut key conflict to occur.

What I'll do instead is define a command with which the running process that has focus can be stopped. What you can do then is configure your own shortcut key for it by editing Atom's key map.

eddyc commented

Yeah I've noticed myself when remapping keys that there can be quite a few conflicts going on if you have a good few packages installed. Just having the command defined so a user can add their own keymap would be brilliant.

Hi

Version 0.15.0 has been released with the following new commands:

  • Kill Focused Process: Kills the process that is currently shown.
  • Kill And Remove Focused Process: Kill the process that is currently shown and removes its output.
  • Remove Focused Output: Removes the output that is currently shown, unless the process is still running.
eddyc commented