From 53a66c6254c7a5d6000eee2b3a6b02d340d5511e Mon Sep 17 00:00:00 2001 From: snailed Date: Mon, 6 Feb 2023 21:15:02 +0000 Subject: Create remapd This script will automatically run remaps when it detects a line in dmesg that contains "input:" --- .local/bin/remapd | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .local/bin/remapd (limited to '.local') diff --git a/.local/bin/remapd b/.local/bin/remapd new file mode 100644 index 0000000..93a23f6 --- /dev/null +++ b/.local/bin/remapd @@ -0,0 +1,6 @@ +#!/bin/sh +while : ; do + dmesg -W -f kern | grep "input:" -q + sleep 1 + remaps +done -- cgit v1.3.1 From 136456e4fab5a7cb428add6e995c941b2c99dcbe Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 6 Feb 2023 18:19:09 -0500 Subject: add comment, remove remaps from displayselect --- .local/bin/displayselect | 1 - .local/bin/remapd | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to '.local') diff --git a/.local/bin/displayselect b/.local/bin/displayselect index f9e8062..0227a32 100755 --- a/.local/bin/displayselect +++ b/.local/bin/displayselect @@ -58,7 +58,6 @@ onescreen() { # If only one output available or chosen. postrun() { # Stuff to run to clean up. setbg # Fix background if screen size/arangement has changed. - remaps # Re-remap keys if keyboard added (for laptop bases) { killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen } diff --git a/.local/bin/remapd b/.local/bin/remapd index 93a23f6..4ce32b3 100644 --- a/.local/bin/remapd +++ b/.local/bin/remapd @@ -1,4 +1,8 @@ #!/bin/sh + +# Rerun the remaps script whenever a new input device is added. Run by the +# xprofile by default. + while : ; do dmesg -W -f kern | grep "input:" -q sleep 1 -- cgit v1.3.1