etc-gentoo/hprofile/profiles/power/ptest
Hans Wurst 4d9533ca0a Blah
2015-07-31 02:34:53 +02:00

18 lines
247 B
Bash

#
# power/ptest
#
local state="$(echo /sys/class/power_supply/A*)"
if test -n "$state" -a -r "$state"; then
state=$(< "$state")
case "$state" in
(1) echo "adp";;
(0) echo "bat";;
esac
fi
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#