1
0
Fork 0

remaps fixes

This commit is contained in:
Luca Bilke 2024-01-27 19:06:01 +01:00
parent b5dce9665e
commit c349b31005
3 changed files with 8 additions and 6 deletions

View file

@ -7,7 +7,7 @@ start() {
start xwallpaper --zoom "${XDG_DATA_HOME:-$HOME/.local/share}/bg"
start pipewire
start remaps -qd
start remaps -q
start checkup
start playerctld daemon
start picom

View file

@ -1,5 +1,5 @@
#!/bin/sh
while :; do
watch -gn1 eval 'xinput --list | grep keyboard' >/dev/null 2>&1
remaps -qd
remaps -q
done

View file

@ -11,7 +11,7 @@ rotate() {
[ "$f" = "$current" ] && found=1
f=
done
[ -z "$f" ] && f=$first
[ -h "$f" ] || [ -z "$f" ] && f=$first
ln -sf "$f" keymap
}
@ -29,12 +29,14 @@ setmap() {
cd "$MAP_DIR" || return 1
notifier="notify-send"
while getopts "qdls:" opt; do
while getopts "rqdls:" opt; do
case $opt in
q) notifier=":" ;;
d) setmap ;;
s) setmap "$OPTARG" ;;
s) setmap "$OPTARG"; exit ;;
l) find . -type f -printf "%f\n"; exit ;;
*) ;;
esac
done
rotate
setmap