Post by @rqm

Replying to @rqm
jordipovea
@jordipovea @bsd.cafe

@rqm I think you can achieve that with /etc/apm/warnlow man.openbsd.org/apmd.8#EXAMPLES

Replying to @rqm
Hund
@hund @fosstodon.org

@rqm I use upower: `upower -b`. It shows me a lot of useful statistics.

I have a custom widget in Polybar that display the current percentage and remaining time when I'm on battery and when I'm charging it.

Replying to @rqm
Hund
@hund @fosstodon.org

@rqm I use upower: `upower -b`. It shows me a lot of useful statistics.

I have a custom widget in Polybar that display the current percentage and remaining time when I'm on battery and when I'm charging it.

Replying to @hund@fosstodon.org

@hund@fosstodon.org Cool! I've got a custom polybar widget as well, calling a little sysctl script. Only thing is I often don't glance at it frequently enough so I really could use an alert. Here's the script btw:

$ cat ~/.scripts/battery.sh 
#!/bin/sh
batt_percent=`sysctl -n hw.sensors.acpisbs0.percent0 | awk '{print $1;}'`
charging=`sysctl -n hw.sensors.acpiac0.indicator0 | awk '{print $1;}'`
if [ "$charging" == "On" ]; then
	echo "$batt_percent+"
else
	echo "$batt_percent"
fi
Replying to @rqm
Hund
@hund @fosstodon.org

@rqm Neat!

Replying to @rqm
oxy ~ *|* ~
@oxy @bsdlab.au
@rqm nice!
Replying to @rqm
florian :flan_hacker:
@florian @bsd.network

@rqm this might work for you:
uncomment

#*.emerg                            *

in /etc/syslog.conf and restart syslogd. apmd will scream at you on all consoles (xterms) when the battery drops below 25% (iirc).