aboutsummaryrefslogtreecommitdiff
path: root/i3/blocks/usb
diff options
context:
space:
mode:
Diffstat (limited to 'i3/blocks/usb')
-rwxr-xr-xi3/blocks/usb15
1 files changed, 15 insertions, 0 deletions
diff --git a/i3/blocks/usb b/i3/blocks/usb
new file mode 100755
index 0000000..e294e7d
--- /dev/null
+++ b/i3/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