diff options
Diffstat (limited to '')
-rwxr-xr-x | .i3-blocks/blocks/usb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.i3-blocks/blocks/usb b/.i3-blocks/blocks/usb new file mode 100755 index 0000000..e294e7d --- /dev/null +++ b/.i3-blocks/blocks/usb @@ -0,0 +1,15 @@ +#!/bin/bash + +DEVICE_NAME="${BLOCK_INSTANCE:-Keyboard}" + +DEVICE_INFO=$(lsusb | grep -i "${DEVICE_NAME}") + +if [[ "${DEVICE_INFO}" != "" ]]; then + echo "on" + echo "on" + echo "" +else + echo "na" + echo "na" + echo "" +fi
\ No newline at end of file |