2018-04-10 15:38:18 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2018-08-19 11:29:59 +02:00
|
|
|
if [ -f /proc/acpi/bbswitch ]
|
2018-04-10 15:38:18 +02:00
|
|
|
then
|
2018-08-19 11:29:59 +02:00
|
|
|
echo -n
|
|
|
|
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
|
|
|
|
if [ "$state" == "ON" ]
|
|
|
|
then
|
|
|
|
echo ""
|
|
|
|
elif [ "$state" == "OFF" ]
|
|
|
|
then
|
|
|
|
echo ""
|
|
|
|
else
|
|
|
|
echo "?"
|
|
|
|
fi
|
2018-04-10 15:38:18 +02:00
|
|
|
else
|
2018-08-19 11:29:59 +02:00
|
|
|
echo
|
2018-04-10 15:38:18 +02:00
|
|
|
fi
|