put keyboard check in main function

This commit is contained in:
Rasmus Steinke 2016-08-30 17:26:54 +02:00
parent b0406cd1ba
commit 8945b01f87

View File

@ -39,9 +39,6 @@ help="Alt+h"
switch="Alt+x" switch="Alt+x"
insert_pass="Alt+n" insert_pass="Alt+n"
if [[ -n $keyboard ]]; then
setxkbmap "${keyboard}"
fi
# get all password files and create an array # get all password files and create an array
list_passwords() { list_passwords() {
@ -535,6 +532,10 @@ if [[ ! -d "$HOME/.cache/rofi-pass" ]]; then
mkdir "$HOME/.cache/rofi-pass" mkdir "$HOME/.cache/rofi-pass"
fi fi
if [[ -n $keyboard ]]; then
setxkbmap "${keyboard}"
fi
# set help color # set help color
if [[ $help_color == "" ]]; then if [[ $help_color == "" ]]; then
help_color=$(rofi -dump-xresources | grep 'rofi.color.normal' | gawk -F ',' '/,/{gsub(/ /, "", $2); print $2}') help_color=$(rofi -dump-xresources | grep 'rofi.color.normal' | gawk -F ',' '/,/{gsub(/ /, "", $2); print $2}')