MACRO: "Ctrl Alt Del" Triggered "Renice" for open Apps

Simply hit Ctrl-Alt-Del (Ctrl-Alt-Fn-Backspace on Mac Laptop keyboards) and you'll get prompted to type an application name, once selected, you'll be promoted for a Unix "renice" value.

The default I chose was "-20" because I usually want to speed up a particular app that may otherwise be in the background, but I included -20, -10, 0, 10, and 20 as pushbutton values.

I find this significantly faster than the alternative of doing this via multiple steps in the command line.

I'm very much open to constructive feedback on this. It's my first contributed Keyboard Maestro Macro.

Download ⇢ Renice.kmmacros (5.4 KB)


Does this still work? Every time I renice I check and the app says its current value is 0.

Sorry for the late reply. I think it's a permission issue that I should have addressed in the initial post. You need to make sure that you can run sudo renice without a password:

Edit your sudoers file, using sudo visudo in Terminal, so renice doesn't need a password.

The line to add will be:

your_short_username ALL=NOPASSWD: /user/bin/renice

It's vi, so i to enter interactive mode, add the line, then hit the Esc key and type :wq and hit Return to write-and-quit.

(Copied from the KM forum post about something similar: How to run sudo command in KM? - #6 by Nige_S

And, unfortunately, including all my silly errors!

The "modern" (and proper) way to do this is is to add a file into /private/etc/sudoers.d/(and I always forget that...). It's often done on a file-per-command basis, so:

In Terminal, type whoami and note your short username -- you can select and Copy it if you want. Then sudo visudo /private/etc/sudoers.d/renice and enter your password if asked.

Terminal window will be empty except for a bunch of ~ down the left. So, with the cursor at the top, hit ito enter "Insert" mode. Type or paste in your short username, a space to tab, then ALL=NOPASSWD: /usr/bin/renice. Hit ESC to exit "Insert" mode and then :wq and Return to write-and-quit.

And apologies to @elliot for passing on bad info...