dotfiles/eww/scripts/kb.sh

19 lines
328 B
Bash
Raw Normal View History

2022-05-22 15:32:36 -04:00
#!/usr/bin/bash
NAME="ErgoDox EZ Shine Keyboard"
if ! xinput | grep "$NAME" > /dev/null; then
echo ""
exit
fi
ID=$(xinput | grep "$NAME" | cut -d "=" -f2 | cut -d " " -f1)
CAPS="$(xinput --get-feedbacks $ID | grep led_mask | awk '{ print $3 }')"
if [[ "$CAPS" == "1" ]]; then
#echo "⇪"
echo ""
else
echo ""
fi