Skip to content

Instantly share code, notes, and snippets.

@jbpotonnier
Created July 18, 2012 09:09
Show Gist options
  • Save jbpotonnier/3135170 to your computer and use it in GitHub Desktop.
Save jbpotonnier/3135170 to your computer and use it in GitHub Desktop.
Switch between dvorak and fr keyboard. I map it using my window manager
#!/bin/bash
kbd=`setxkbmap -query | grep layout | awk '{print $2}'`
if [ 'fr' = $kbd ]
then
notify-send 'Keyboard is now Dvorak'
setxkbmap dvorak en -option compose:ralt
else
notify-send 'Keyboard is now French'
setxkbmap fr -option
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment