serhii.net

In the middle of the desert you can say anything you want

19 Jan 2025

arch linux low battery notification

#!/bin/bash

BATTINFO=$(acpi -b)
LIM="00:15:00"
if  grep Discharging) && $(echo $BATTINFO | cut -f 5 -d " ") < $LIM ; then
  # DISPLAY=:0.0 /usr/bin/notify-send "low battery" "$BATTINFO"
  dunstify "low battery" "$BATTINFO"
fi

For this, install and run on startup dunst, then cron job for the above.

Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus