keylayout.sh 307 B

123456789101112131415161718
  1. #! /bin/sh
  2. #
  3. # keylayout.sh
  4. # Copyright (C) 2017 Paul Schaefer <schaefer.pp@gmail.com>
  5. #
  6. # Distributed under terms of the Apache 2.0 license.
  7. #
  8. CURRENT_LANG=$(setxkbmap -query | grep "layout" | cut -f6 -d ' ')
  9. if [ "$CURRENT_LANG" = "gb" ]
  10. then
  11. setxkbmap de
  12. else
  13. setxkbmap gb -variant umlauts
  14. fi