It is a simple bash script that reminds when plug and unplug laptop charger, it will work with any xdg desktop environment like gnome, I based on 3 scripts to create it, and it functions with Archlinux:
Put it inside /usr/bin
then grant execute permisions
All you have to do is put it inside /etc/xdg/autostart