1) Where can I find the
Shortcut for control the script and what can I do with it ?
👉 You can get the PlagNPlayMac shortcut from this link or you can create it manually.
2) How can I start and stop the automation of the script ?
You can easilly stop the automation of the script by running the following command on the terminal:
launchctl unload /Library/LaunchAgents/com.launch.plug.and.play.mac.plist
for restart it:
launchctl load /Library/LaunchAgents/com.launch.plug.and.play.mac.plist
3) Accidentally I have insert the wrong password how can I change it?
If you have insert the wrong password and you want to change it
4) How can I add more displays to the script ? I need to run the script when I am home and when I am at work
For add more displays to the script here
5) How can I change the battery level ?
- Open the
PNPMacParam.sh
file and edit the following variables: - Change the value of batteryValue with the one in range 50-95 (100 only if you don't want to have the battery limit)
- Save exit and restart the script with the command:
launchctl unload /Library/LaunchAgents/com.launch.plug.and.play.mac.plist
launchctl load /Library/LaunchAgents/com.launch.plug.and.play.mac.plist
NOTE: The batteryValue
of bclm as mentioned it will be 3 point greather then the value setted in the script. So if you set batteryValue=77
the battery limit will be 80.
6) Somthing don't work what I have to do ?
If somthing you can try to find a solution by checking the log file /private/tmp/plug.and.play.mac.log
If the problem is not correlated to a wrong password or a wrong name of the display you can open an issue here and post the result of the log file.
7) How can I completelly erease the script and all the file correlated ?
Just kidding 😂 of corse you can delete it.
You can do it by deleting the following files:
-
/Library/LaunchAgents/com.launch.plug.and.play.mac.plist
-
/usr/local/bin/PlugNPlayMac
(DELETE THE ENTIRE FOLDER) -
Remember to remove bash and bclm from
System Settings > Privacy & Security > Full Disk Access