This micro project allow users with MacBooks to toggle power saving mode via Raycast through shortcut. This is faster and more convinient when you use power saving mode, but on occasison need to toggle this setting (and don't want to do this using settings)
This code, when configured correctly would work as follows:
- Open Raycast (better spotlight)
- Write name of the created command script (or just the name of the shortcut assigned to the command)
- Press 'Enter' to execute
- Confirm 1 time via TouchId
- Confirm 2 time via TouchId
This should toggle the power mode to "Battery Saving when not plugged in".
To allow to confirm command using TouchID on your Mac (if you hava a scanner) you have to modify the system file, to allow this option. Unfortunately, this FILE IS RESETTED every time you update your Mac - it's not a big deal for me, but you should know that this is not a bug.
Instruction on how to toggle this might be found here (I found it here as well :) )
https://dev.to/equiman/how-to-use-macos-s-touch-id-on-terminal-5fhg
- Open Raycast
- Type 'Create Script Command'
- Fill name
- Save bash file ('.sh') in desired location
- Paste my code instead of the sample
- Here you can modify the name and icon, but the names in file should exlain everything :)