19 lines
288 B
Bash
Executable file
19 lines
288 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if [ -f /proc/acpi/bbswitch ]
|
|
then
|
|
echo -n
|
|
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
|
|
if [ "$state" == "ON" ]
|
|
then
|
|
echo ""
|
|
elif [ "$state" == "OFF" ]
|
|
then
|
|
echo ""
|
|
else
|
|
echo "?"
|
|
fi
|
|
else
|
|
echo
|
|
fi
|