

(Replace /path/to/audio-file by a valid path to an actual audio file present in your system). Notify-send -u critical "Please unplug your AC adapter" "Battery level: $% (charged above 90%)" -i battery-full-charged play /path/to/audio-file

If then #check if the battery level is over 90% If on_ac_power then #check if AC is plugged in Create an empty text file, say battery-full.sh and add the following lines #!/bin/bashīattery_level=`acpi -b | grep -P -o '+(?=%)'` Install it by running sudo apt install acpi Probably not the best way, but you can do something like the following.įirst you'll need acpi.
