mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-05-11 17:35:57 +08:00
Disable battery notifications script if no battery is found
This commit is contained in:
parent
7e433a333c
commit
feb0452d5e
1 changed files with 5 additions and 0 deletions
|
|
@ -8,6 +8,11 @@ level_full=97
|
|||
level_low=20
|
||||
level_critical=10
|
||||
|
||||
if [ ! -f "$battery_file" ]; then
|
||||
echo No battery found. Exiting.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify() {
|
||||
playsound "$HOME/.config/sounds/system-error-notice.mp3"
|
||||
notify-send.sh -R /tmp/battery-notifications-file "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue