[BRLTTY] Being notified when battery level is low

Mario Lang mlang at blind.guru
Tue Oct 6 07:00:50 EDT 2020


Sébastien Hinderer <Sebastien.Hinderer at ens-lyon.org> writes:

> Raphaël POITEVIN (2020/10/06 10:21 +0200):
>> Maybe a cron running a script which check the battery level with
>> acpi. You can send a sound.
>
> Yeah that could be an option indeed. Thanks!

if [ $(cat /sys/class/power_supply/BAT0/capacity) -lt 10 ]
then play sound
fi

For those which use Emacs as their text desktop environment,
there is
M-x battery RET which will display battery status in the echo area and
M-x display-battery-mode RET which will display battery status in the mode-line.

I sometimes also use "acpi -bat" on the command line to check the
temperature and how long I will be able to continue working on battery.

P.S.: It appears the same things are coming up over and over again for
those of us who do not run a graphical desktop.  Screen curtain and
battery status come to mind.  Maybe it is time to actually write a tool
which somehow collects these small tasks into something that somehow
just works.  I would love to have something like
apt install text-mode-junkie
It would make it easy to turn down keyboard and display backlight, play
a sound when battery is low and maybe offer current weather based on the
current IP address.  Basically what GNOME 2 used to offer as applets.

-- 
CYa,
  ⡍⠁⠗⠊⠕


More information about the BRLTTY mailing list