Created
April 9, 2023 20:49
-
-
Save heywoodlh/1baa13d67544245c11112e58fc45d967 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
title="Battery" | |
battery_level="$(pmset -g batt | grep 'InternalBattery' | awk '{print $3 $4}' | awk '{print $1}' | cut -d';' -f1)" | |
osascript -e "display notification \"${battery_level}\" with title \"${title}\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment