1
0
Fork 0

remaps improvements

This commit is contained in:
Luca Bilke 2024-01-26 13:25:17 +01:00
parent 9ebeb43013
commit 2f05a92a22
1 changed files with 9 additions and 4 deletions

View File

@ -16,7 +16,7 @@ rotate() {
}
setmap() {
current="$(readlink keymap)"
current=${1:-$(readlink keymap)}
xkbcomp "$current" "$DISPLAY" >/dev/null 2>&1 || return 1
xset r rate 300 50
xset -q | grep -q "Caps Lock:\s*on" && xdotool key Caps_Lock
@ -28,12 +28,17 @@ setmap() {
cd "$MAP_DIR" || return 1
notifier="notify-send"
while getopts dqQ flag; do
case "$flag" in
while
case "$1" in
q) notifier=":" ;;
d) setmap; return ;;
s) setmap "$2"; return ;;
l) ls "$MAP_DIR" | grep -i keymap ;;
*) ;;
esac
done
shift
do :; done
rotate
setmap