SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/lib/device-xiaomi-vince/charging.sh" SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/lib/device-xiaomi-vince/discharging.sh"