#! /bin/sh PERCENT0=$(cat /sys/class/power_supply/BAT0/capacity) PERCENT1=$(cat /sys/class/power_supply/BAT1/capacity) PERCENT=$(( ($PERCENT0 + $PERCENT1) / 2)) CHARGING0=$(cat /sys/class/power_supply/BAT0/status) CHARGING1=$(cat /sys/class/power_supply/BAT1/status) [[ "$CHARGING0" == "Charging" || "$CHARGING1" == "Charging" ]] && exit; [ "$PERCENT" -le 15 ] && notify-send "Brrr" "<15% | Low Bat"