Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# check for xinput
command -v xinput >/dev/null 2>&1 || { echo "install xinput" >&2; exit 1; }
# list pointers
list=`xinput list | grep "slave *pointer" | grep -vi "virtual core" | grep -vi "keyboard"`
count=`echo "$list" | wc -l`
echo "$list"