Jump to content

Kill Process Workflow


Recommended Posts

Posted (edited)

I made a workflow to kill processes quickly.

 

You can grab it (and read more about it) on GitHub.

Direct download link.

 

Here are some highlights:

  • Autocompletes process names
  • Learns and prioritizes processes you kill frequently
  • Shows icons when possible
  • Shows CPU usage
  • Shows process paths
  • Ignores case

Screenshot:

screenshot.png

Enjoy, and feel free to share any feedback you have.

Edited by ngreenstein
Posted (edited)

Very nice. I'd suggest though to pass the pid to args and kill using

kill -9 <pid>

This has less potential side effects.

Edited by nikipore
Posted

Nope. My test case: Open Terminal.app, press Command-N twice. Then you have two processes named "bash". Kill one of them just pressing Enter (works). Kill the other two pressing Command-Enter (doesn't work).

Posted

Try with anything other than bash and let me know if it works for you. I think the problem is that bash has a hyphen at the beginning of the process name and killall is trying to interpret that as a flag (even though it's in quotes). Any ideas?

 

Thanks for your help with testing this!

Posted (edited)

Now I started two Python interpreters. Their process name is something like this (these are MacPort Python 2.6 interpreteres, just in case you wonder):

 

 8980 ttys001    0:00.02 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python

 

And it doesn't work. I haven't looked into your code, but since youre identifying all processes correctly, why don't you pass all process IDs to the arg and put the row-specific pid in the first position? Then the scripts should pretty much look the same, except that one loops over all pids, and the other only picks the first one. No issues with weird names whatsoever.

Edited by nikipore
Posted

Ok, just pushed another update. Let me know if it changes anything.

 

It now works perfectly OMM for Python, bash, and every other process I've tried it with.

 

I don't have MacPorts to test with, but at this point I can't repro any issues.

 

Thanks for your help!

Posted (edited)

awesome one! thanx

 

One thing, how about not requiring the query, and when there's no query, showing the top CPU consuming procceses, and then filtering by typed query?

Edited by altryne
  • 1 year later...
Posted

Good idea, thank you! Please submit a pull request on GitHub and I'll add this change.

 

I edited the icon to have a white border so that it's visible in the black. I figured I'd put it here for anyone that wants it.

 

Old:

6EUiaLc.png

 

New:

bxUwKb9.png

 

PNG here:

kGQ2Dqc.png

  • 5 months later...
Posted

Can we please have an option to relaunch an app, not just kill it? For example if we hold the Shift key with "kill" the workflow can forcequit and relaunch the app, that would be very useful!

Posted

Can we please have an option to relaunch an app, not just kill it? For example if we hold the Shift key with "kill" the workflow can forcequit and relaunch the app, that would be very useful!

 

Yes, this is quite good! 

Or have a special keyword for killing and relaunching. I'm OK with any option as long as there is such functionality. 

Posted

Can we please have an option to relaunch an app, not just kill it? For example if we hold the Shift key with "kill" the workflow can forcequit and relaunch the app, that would be very useful!

 

 

Yes, this is quite good! 

Or have a special keyword for killing and relaunching. I'm OK with any option as long as there is such functionality. 

 

That's a great idea! I'm afraid I don't have time to add this at the moment, but, if anyone feels up to it, they're more than welcome to submit a pull request on the GitHub repo. Thanks!

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...