dotfiles/config/polybar/bbswitch

19 lines
288 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2018-08-19 11:29:59 +02:00
if [ -f /proc/acpi/bbswitch ]
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
else
2018-08-19 11:29:59 +02:00
echo
fi