How to set battery level notification on MacBook, when it is under 20 %? (macOS Ventura)

Hi everybody!


I'd like to ask You a question - is it possible to set battery level notification on MacBook, when it is under 20 % (same way as it is on iPhone)?


I've just found, that it is possible via third party software, but I'd rather use somehow native option in settings, but i could not find it, or an Apple app, if it's possible. Any ideas? I've tried shortcuts, but without automatization it is not working properly, Automator + AppleScript weren't working either.


It will be cool, if this feature in Settings in options for battery appears in an update or a new version.


Thank You for Your help.


Majkinho

Posted on Jul 20, 2023 8:49 AM

Reply
29 replies

Jul 2, 2024 12:50 AM in response to queen4

Actually, it was bit annoying getting a notification every minute while the battery was at 80%, so I modified my shortcut:



You'll want to create a file called battery.txt which just contains any number initially, and modify the shortcut to use your filepath for battery.txt. This file will store the previous battery level the last time the script ran, so that we can check if the battery level changed since the last time the script ran.


Jul 1, 2024 10:13 PM in response to Majkinho

I was also looking for a quick way to set notifications for when my battery was at a certain level, and it looks like you can trigger shortcuts from command line so I did set it up to run every minute using crontab:


Created a shortcut (can change the if statement to what you want):



Added a CronTab to run this shortcut every minute:


  • Open the Terminal app
  • Type this command in Terminal to open the crontab editor:
env EDITOR=nano crontab -e
  • Paste this line in the crontab editor:
* * * * * shortcuts run "80\% Battery Remaining"
  • Exit the crontab editor--if you're not familiar with nano you can exit like this:
    • ctrl + o
    • enter
    • ctrl + x


Now the shortcut should run every minute, and you'll get a notification when the battery level equals 80%.


If you want to check your crontab, you can run `crontab -l` in Terminal. If you get any errors, it'll usually show up in mail which you can view by running `mail` in Terminal.


If you want to trigger the shortcut to run every 5 minutes or some other time interval, you can use this tool to replace the "* * * * *" part:

https://crontab.guru/


Also, there's probably a better way to do this, since the shortcut I'm using wouldn't account for cases where the battery level drops below 80% really quickly (i.e. battery level drops from 81% to 79% within a minute), and it would notify you every minute while the battery is at 80%.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to set battery level notification on MacBook, when it is under 20 %? (macOS Ventura)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.