swapkeyboard 204 B

12345678910
  1. #!/bin/bash
  2. if [[ -n $(setxkbmap -query | grep fr -o) ]]; then
  3. setxkbmap us -variant dvp
  4. else
  5. setxkbmap fr
  6. fi
  7. # To display us or fr according to current keyboard
  8. # setxkbmap -query | grep -oE "us|fr"