summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2023-02-06 18:19:20 -0500
committerLuke Smith <luke@lukesmith.xyz>2023-02-06 18:19:20 -0500
commitc55a896653cacf5963fe6b4b66aebba61dfaf629 (patch)
tree427ddf16f493a228cb9769fd22460f12b114165e
parent624effaa18ebdbae50116dafc5fec4c7d9259e5b (diff)
parent136456e4fab5a7cb428add6e995c941b2c99dcbe (diff)
downloadeibhear-c55a896653cacf5963fe6b4b66aebba61dfaf629.tar.gz
eibhear-c55a896653cacf5963fe6b4b66aebba61dfaf629.tar.zst
eibhear-c55a896653cacf5963fe6b4b66aebba61dfaf629.zip
Merge branch 'ssnailed-master'
-rwxr-xr-x.config/x11/xprofile2
-rwxr-xr-x.local/bin/displayselect1
-rw-r--r--.local/bin/remapd10
3 files changed, 11 insertions, 2 deletions
diff --git a/.config/x11/xprofile b/.config/x11/xprofile
index 0e22628..affa8de 100755
--- a/.config/x11/xprofile
+++ b/.config/x11/xprofile
@@ -8,7 +8,7 @@ setbg & # set the background with the `setbg` script
#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
remaps & # run the remaps script, switching caps/esc and more; check it for more info
-autostart="mpd xcompmgr dunst unclutter pipewire"
+autostart="mpd xcompmgr dunst unclutter pipewire remapd"
for program in $autostart; do
pidof -s "$program" || "$program" &
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
new file mode 100644
index 0000000..4ce32b3
--- /dev/null
+++ b/.local/bin/remapd
@@ -0,0 +1,10 @@
+#!/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
+ remaps
+done