I have written a small script that will do that:
Script:
#!/usr/bin/env bash
while true
do
export DISPLAY=:0.0
battery_percent=$(acpi -b | grep -P -o '[0-9]+(?=%)')
if on_ac_power; then
if [ "$battery_percent" -gt 95 ]; then
notify-send -i "$PWD/batteryfull.png" "Battery full." "Level: ${battery_percent}% "
fi
fi
sleep 300 # (5 minutes)
done
Installation:
Run:
sudo apt-get install acpi
git clone https://github.com/hg8/battery-full-notification.git
cd battery-full-notification/
chmod +x batteryfull.sh
Copy the script to ~/bin
folder (why the ~/bin folder?) :
cp batteryfull.* ~/bin
Or copy it to /usr/local/bin
if you want it to be available for all users on your computer:
cp batteryfull.* /usr/local/bin
Then add batteryfull.sh
script as a startup application by: