Open rabbly opened 10 months ago
You also can edit Clamshell commands to add your password like:
do shell script "sudo pmset -a disablesleep 1" with prompt "OnlySwitch" with administrator privileges password "xxxxx"
It wouldn't ask for the password every time.
The most concerning thing about that is having my password randomly stored in plain text somewhere, but good to be aware of as an option.
An alternative way is like OneSwitch, which lets users install a help tool to store account passwords to keychain. It would be safer than in plain.
Is that something I can do, or requires a change to OnlySwitch?
I will investigate how to implement it and add it on my side.
Challenge Currently the Clamshell Evolution script requires you to enter your password every time. My password requirements are extremely long so this is a challenge.
Feature request Remove the password requirements
Workaround I have found a workaround by editing the sudoers file for the pmset command. That is not very user friendly though. For this workaround I did the following;
your_short_username ALL=NOPASSWD: /usr/bin/pmset
do shell script "sudo pmset -a disablesleep 1"
Other solutions OneSwitch has a solution for this and seems to be able to handle it