diff options
author | Rasmus Steinke <rasi@xssn.at> | 2017-03-11 19:14:10 +0100 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2017-03-11 19:14:10 +0100 |
commit | 748eb8ec392c21424ccd9fbefef2b3ee0fce2ab3 (patch) | |
tree | 43d6a389a98e7e8e6770d03363e86f214e2195b8 | |
parent | e72d58a655710319268371ac735616b17d2e6863 (diff) | |
download | rofi-pass-748eb8ec392c21424ccd9fbefef2b3ee0fce2ab3.tar.gz |
try to detect keyboard layout
-rw-r--r-- | config.example | 5 | ||||
-rwxr-xr-x | rofi-pass | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/config.example b/config.example index 3e3c8bf..471fe6c 100644 --- a/config.example +++ b/config.example @@ -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' @@ -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 |