From 4a2efd1ecc4ae4633f0b30c84a91adf2e720a745 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Fri, 17 Jun 2022 03:22:52 -0700 Subject: [PATCH] added battery notification script --- scripts/batnotify | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/batnotify diff --git a/scripts/batnotify b/scripts/batnotify new file mode 100755 index 00000000..5a0ffb41 --- /dev/null +++ b/scripts/batnotify @@ -0,0 +1,11 @@ +#!/bin/bash + +while [ true ] ; do + PWRLVL=$(cat /sys/class/power_supply/BAT1/capacity) + if [ $PWRLVL -eq 15 ] ; then + exec notify-send "Battery is at 15%!!"; + break; + else + sleep 15s; + fi +done