Answer by hg8 for How can I get notification when my laptop battery gets...
I have written a small script that will do that: Script: #!/usr/bin/env bash while true do export DISPLAY=:0.0 battery_percent=$(acpi -b | grep -P -o '[0-9]+(?=%)') if on_ac_power; then if [...
View ArticleAnswer by Janus Troelsen for How can I get notification when my laptop...
Install the acpi package. Now put this in return0whencharging.sh and make it executable: #!/bin/sh acpi -V if cat /proc/acpi/battery/BAT1/state | grep "charging state" | grep -vE ":[\t ]*charging$";...
View ArticleHow can I get notification when my laptop battery gets fully charged?
Sometimes my charger remains plugged into laptop even after charging is complete. Is there a way to get a pop-up message/notification when my battery gets full due to charging or is there any...
View ArticleAnswer by Devarshi Sathiya for How can I get notification when my laptop...
Here is the Crontab that I useNotify if battery is full (equal to 100%)*/1 * * * * if [ $(cat /sys/class/power_supply/BAT0/capacity) -eq 100 ]; then XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send Hey...
View ArticleAnswer by Yogi Katba for How can I get notification when my laptop battery...
I was looking for the same thing and found this extension and it works as expected.
View Article