try to detect keyboard layout

This commit is contained in:
Rasmus Steinke 2017-03-11 19:14:10 +01:00
parent e72d58a655
commit 748eb8ec39
2 changed files with 6 additions and 2 deletions

View File

@ -6,8 +6,9 @@ _rofi () {
rofi -i -width 700 -no-levenshtein-sort "$@"
}
# keyboard layout (set this to your actual layout. E.g. keyboard="de us"
keyboard=us
# rofi-pass tries to detect keyboard layout automatically
# if this fails try to set it manually here.
# keyboard=us
# fields to be used
URL_field='url'

View File

@ -563,6 +563,9 @@ fi
if [[ -n $keyboard ]]; then
setxkbmap ${keyboard}
else
keyboard=$(setxkbmap -query | grep layout | grep -oE '[^: ]+$')
setxkbmap ${keyboard}
fi
# set help color