by BugsB, based on a script by Toggi3 * + more code snippets from the www
IMPORTANT NOTICE: I am in exam mode right now, "squeezed this in" and likely don't have time to reply or even read all comments until early mid December, so it won't help to PM me - I'll have to ignore. From my side this utility is as it is for now. If anybody with scripting skills knows improvements, just go ahead and provide them below. Thank you for your understanding.
For those of us whose HackBook/ MacBook does not go to into power saving mode automatically on very low battery but just powers down coldly: “SOLB”, a small and low load footprint AppleScript based utility that checks the battery level every 2 minutes. You can choose between two versions, either with or without sound. Both display a notification in the top right of your screen.
Between ≤10 and >8% battery charge:
Between ≤8 and >5% battery charge:
On ≤ 5% battery charge you will see a 10 seconds countdown dialog box in 1 second intervals:
which you can cancel, or have your your *ac*Book be sent to sleep when down to 0.
The version with sound uses the pleasant macOS US female voice Allison. If the lady is not installed, you can download "her" via System Preferences, Accessibility, Speech (pane tab should get opened by the install script), click onto the two arrows to the right of System Voice, Customize, English (Unites States) -- Female, activate Allison, OK (macOS downloads voices to /System/Library/Speech/Voices - Allison consumes 120 MB).
If you want to see/ see and listen first, disconnect your Mac from its power supply and double click the “run Demo” file in either folder, with or without sound.
The launcher is installed per user, so one user can use the script with and another user the script without sound.
Run your desired install.command, with or without sound. The script should be active right away without restart.
Regarding the sound version, you can also:
- download any other English voice of your liking and edit the name inside the script at the very top
- download any language voice and translate the text inside the script
Edit with with Apple Script Editor, save, install, reboot.
Tested working in macOS High Sierra 10.13.6. Please feedback if this utility also works in Mojave.
If you have ideas, experience bugs, etc., please contribute as precise, succinct, productive and friendly as possible. In case of a bug, always include your version of macOS for me or others to try and help. Thank you.
1.0 (initial version)
IDEAS TO IMPLEMENT IN FUTURE RELEASES:
Have the sound version install script check if Allison is installed, and if not, offer to download and install it.
Purely cosmetic: find a way to have the display notification in the top right of the screen not display the Script Editor icon but the one of the utility without turning the utility into an app but by maintaining a script to keep the load footprint low. This is currently neither possible with an Apple Script nor with an Apple Script Bundle file, only with the script compiled into an app. One possibility might be a Perl approach, if someone volunteers.
* Thanks to Toggi3 for the base script: https://hints.macworld.com/article.php?story=20110219013713667
THE CODE (of the version with sound):
SleepOnLowBattery (SOLB) by BugsB v.1.0 (2018-11-10).zip
To build a Hackintosh never was easier. Use my tutorial how to install macOS on PC and download already prepared and tweaked Clover folder. You can get up and running your Hackintosh build in just 2 hours and you will don’t need to tweak anything.
I am fairly new to the world of Hackintosh. I recently moved my previous build into a smaller form factor. However, I am running into a series of problems with the USB ports on the new case and the new motherboard.
- Gigabyte Z270N Gaming 5
- 16GB Trident Z RGB 3200 MHz
- Sapphire RX 470
- NZXT Kraken x62
- NZXT H200 for the case
Everything in the Hackintosh works just like it did before, nothing changed in the hardware department other than the motherboard (previously a gigabyte Z20X Ultra) and the case.
This motherboard does not have any USB 2.0 ports in the back, there is only one header on the board, currently taken by the Kraken x62. The rest of the ports are all either USB 3.1 Gen1 or USB 3.1 Gen2, and the front of the case has 3.1 Gen1 ports as well.
This is my current problem:
When I plug something into either the type A or type C Gen2 ports, it works fine as a normal USB 3.x device with normal speeds, but when I plug something into any other USB port, it only works at lower 2.0 speeds. This is a big problem for me, since I have a few external devices that need the 3.0+ speeds and I don't know what to do.
I tried to follow many different guides on how to patch USB ports, remove the limits, etc... But nothing seems to work.