You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fix-xkbmap 506B

12345678910111213141516171819
  1. #!/bin/sh
  2. # Copyright: 2017 Alf Gaida <agaida@siduction.org>
  3. # License: WTFPL-2
  4. #
  5. # 0. You just DO WHAT THE FUCK YOU WANT TO.
  6. [ ! -f /usr/bin/setxkbmap ] && exit 0
  7. [ ! -f /usr/bin/localectl ] && exit 0
  8. xkbmap=$(setxkbmap -query | grep layout | awk -F':' '{print $2}')
  9. locale=$(localectl | grep 'X11 Layout' | awk -F':' '{print $2}')
  10. if [ "$xkbmap" != "$locale" ]; then
  11. if [ ! -f "$HOME/.config/xkbfirstrun" ]; then
  12. setxkbmap $locale;
  13. touch "$HOME/.config/xkbfirstrun"
  14. fi
  15. fi