DEV Community

Ryan Westlund
Ryan Westlund

Posted on

My new battery_warn.sh

#!/bin/sh

if test "`acpi | cut -d' ' -f4 | cut -d% -f1`" -le 10; then
    espeak "low battery"
fi
Enter fullscreen mode Exit fullscreen mode

I simplified this after finding out about the acpi tool, which has been added to my personal checklist of things to install every time I set up a Linux system. I'm happy.

Discussion (2)

Collapse
maulik profile image
Maulik

cool!

Collapse
patarapolw profile image
Pacharapol Withayasakpunt • Edited

It's what I always needed for Conky.