HokieGeek / dotfiles

My linux config files
0 stars 0 forks source link

Create a udev rule that sends a pushbullet when computer's battery is low #99

Open HokieGeek opened 9 years ago

HokieGeek commented 9 years ago

https://docs.pushbullet.com/#pushes

curl --header 'Authorization: Bearer <your_access_token_here>' -X POST https://api.pushbullet.com/v2/pushes --header 'Content-Type: application/json' --data-binary '{"type": "note", "title": "Low battery: archie", "body": "archie's battery has dropped to 3%"}'

For my access token, go to: https://www.pushbullet.com/account

HokieGeek commented 9 years ago

Actually, it might be better if I just create a "low battery cloud klaxon" sort of script that pops up an OSD and sends out this pushbullet...

HokieGeek commented 9 years ago

/etc/udev/rules.d/99-lowbat.rules (already in hardware.sh)

SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="3", RUN+="/usr/local/bin/systemnotifier --low-battery=0.03"
HokieGeek commented 9 years ago

Going with https://github.com/HokieGeek/system-notifier