Hmm.... you might want to double check that the path is correct by running this command in Terminal:
echo $PATH | sed 's/:/\n/g'
That will produce a list of anywhere custom scripts are installed. On my iMac it looks like this:
Copy those into your ENV_PATH variable separated by a colon. On my iMac it looks like this (there are extra paths because I also have Homebrew on my MacBook and use the same ENV_PATH variable for both machines):
As @cdthomer writes your ENV_PATH should include all the paths from which you want to run shell scripts commands.
You could also reference the commands path directly in the Execute Shell Script action.
But first you need to find where brightness is installed.
You can use this command which brightness.
On my system it returns /usr/local/bin/brightness.
So the command could be /usr/local/bin/brightness 1
I prefer to add my paths to the ENV_PATH, so normally a command which works in the terminal works in KM.
Hi @HopelesslyConfused. (Nice username, BTW.) This won't specifically address the trigger issue you mentioned, but regarding the brightness adjustment, you could borrow some actions from this macro Toggle Brightnessavailable here.
So to use Brightness it seems you need to install it from source.
The instructions below is taken from the github page for the project.
I have never installed anything like this from source, so I do not know where the command gets installed.
Install From Source
git clone https://github.com/nriley/brightness.git cd brightness make sudo make install
Hmm, that didn't work either, but I did manage to modify the macro posted by @_jims to work with the changed power state setting. If anyone else wants to use it, here it is! You can change your dim setting and bright setting by hitting Option-Command-H.
Hi @HopelesslyConfused, I decided to start with Toggle Brightness and create a new macro with several enhancements including automatic adjustment for power transitions: Charger to Battery and vice versa.
I recommend you use the new macro as it likely has some other features you will find useful. In addition it has been much more thoroughly tested. Frankly, Toggle Brightness was slapped together and had a few rough edges. I've officially declared it superseded in the thread where it was posted.