Compare commits

...

9 Commits

Author SHA1 Message Date
Luke Smith
e0331ad0e7
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2023-02-09 11:53:03 -05:00
Luke Smith
c5f4c6c9f4
Merge branch 'ssnailed-patch-1' 2023-02-09 11:52:55 -05:00
Luke Smith
88477d8497
use bash procsub 2023-02-09 11:52:47 -05:00
Luke Smith
9bf90a1b72
Merge branch 'patch-1' of https://github.com/ssnailed/voidrice into ssnailed-patch-1 2023-02-09 11:51:29 -05:00
Luca Bilke
457539c043 remove complexity 2023-02-09 17:11:16 +01:00
Luke Smith
505d86c848
Merge branch 'patch-1' of https://github.com/ssnailed/voidrice into ssnailed-patch-1 2023-02-09 09:50:36 -05:00
Luca Bilke
ec1914e0b9 fix broken trap 2023-02-09 15:39:31 +01:00
Luke Smith
0567be0efe
Merge branch 'patch-1' of https://github.com/ssnailed/voidrice into ssnailed-patch-1 2023-02-09 09:22:27 -05:00
snailed
cc53f7be1c
Clean up remapd
I found a much better way of doing this, without a potentially too short sleep. This script waits for an input to be added, and then waits for a usb device to be bound. The remaps script can be run as soon as the USB device is bound. These changes should improve the reliability of the script and maybe even decrease latency.
2023-02-09 09:23:22 +00:00
2 changed files with 5 additions and 6 deletions

View File

@ -1,9 +1,8 @@
#!/bin/sh
#!/bin/bash
# Rerun the remaps script whenever a new input device is added.
while : ; do
remaps
dmesg -W -f kern | grep "input:" -q
sleep 1
while :; do
remaps
grep -qP -m1 '[^un]bind.+\/[^:]+\(usb\)' <(udevadm monitor -u -t seat -s input -s usb)
done

View File

@ -8,4 +8,4 @@ setxkbmap -option caps:super,altwin:menu_win
# When caps lock is pressed only once, treat it as escape.
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
# Turn off caps lock if on since there is no longer a key for it.
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
xset -q | grep -q "Caps Lock:\s*on" && xdotool key Caps_Lock