From 8945b01f878c3721f2add24cf03a16a268d13d54 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Tue, 30 Aug 2016 17:26:54 +0200 Subject: [PATCH] put keyboard check in main function --- rofi-pass | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rofi-pass b/rofi-pass index 60ddc1a..b395148 100755 --- a/rofi-pass +++ b/rofi-pass @@ -39,9 +39,6 @@ help="Alt+h" switch="Alt+x" insert_pass="Alt+n" -if [[ -n $keyboard ]]; then - setxkbmap "${keyboard}" -fi # get all password files and create an array list_passwords() { @@ -535,6 +532,10 @@ if [[ ! -d "$HOME/.cache/rofi-pass" ]]; then mkdir "$HOME/.cache/rofi-pass" fi +if [[ -n $keyboard ]]; then + setxkbmap "${keyboard}" +fi + # set help color if [[ $help_color == "" ]]; then help_color=$(rofi -dump-xresources | grep 'rofi.color.normal' | gawk -F ',' '/,/{gsub(/ /, "", $2); print $2}')