#!/bin/sh # Rerun the remaps script whenever a new input device is added. while :; do remaps watch -gn1 sh -c 'xinput --list | grep keyboard' >/dev/null 2>&1 done