#!/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