dotfiles/eww/scripts/kb.sh
2022-05-22 15:32:36 -04:00

18 lines
328 B
Bash
Executable file

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