update dotool wrapper to use keyd layout output

This commit is contained in:
2024-11-13 13:17:22 -05:00
parent fe9f18c43d
commit 70ec6f36da
2 changed files with 6 additions and 32 deletions

View File

@@ -1,2 +1,7 @@
#!/bin/sh
DOTOOL_XKB_LAYOUT=us DOTOOL_XKB_VARIANT=$(get_plasma_keyboard_layout) /usr/bin/dotool "$@"
current_layer=$(timeout 0.1s keyd listen | grep -m 1 '^/' | sed 's/^\///')
if [ "$current_layer" = "qwerty" ]; then
current_layer="basic"
fi
DOTOOL_XKB_LAYOUT=us DOTOOL_XKB_VARIANT=$current_layer /usr/bin/dotool "$@"