dotfiles/config/polybar/bbswitch
2018-08-19 11:29:59 +02:00

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