Last active
December 28, 2023 22:57
-
-
Save Qwaz/b8339df8d662e096cd80ff009d94644d to your computer and use it in GitHub Desktop.
Change wslg keyboard layout to colemak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Base on https://github.com/microsoft/wslg/issues/173#issuecomment-910172263 | |
read -r -d '' GWSL_SYSTEM_CONFIG_COMMANDS <<EOF | |
KEYMAP_LAYOUT=\`grep -r '^keymap_layout=.*\$' /home/wslg/.config/weston.ini\`;if [ -z \$KEYMAP_LAYOUT ]; then sed -i '$ a\\\n[keyboard]\nkeymap_layout=us\nkeymap_variant=colemak\n' /home/wslg/.config/weston.ini;pkill -HUP weston;fi | |
EOF | |
echo "${GWSL_SYSTEM_CONFIG_COMMANDS}" | |
wsl.exe -d $WSL_DISTRO_NAME --system /bin/bash -c ${GWSL_SYSTEM_CONFIG_COMMANDS} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment