aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.example14
-rwxr-xr-xrofi-pass24
2 files changed, 7 insertions, 31 deletions
diff --git a/config.example b/config.example
index 098a036..818cb11 100644
--- a/config.example
+++ b/config.example
@@ -9,15 +9,13 @@ _rofi () {
# xdotool needs the keyboard layout to be set using setxkbmap
# You can do this in your autostart scripts (e.g. xinitrc)
-# Alternatively you can set your options here and set fix_layout to "true"
-# rofi-pass will try to autodetect correct settings, if no layout is set (not recommended)
-# if model is unset, rofi-pass defaults to 'pc104'
-
+# If for some reason, you cannot do this, you can set the command here.
+# and set fix_layout to true
fix_layout=false
-model=pc104
-layout=us
-#variant=us
-#option=compose:caps
+
+layout_cmd () {
+ setxkbmap us
+}
# fields to be used
URL_field='url'
diff --git a/rofi-pass b/rofi-pass
index c905f59..61c3b32 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -597,29 +597,7 @@ fi
# fix keyboard layout if enabled in config
if [[ $fix_layout == "true" ]]
then
- if [[ -z $model ]]
- then
- model=pc104
- fi
- if [[ -n $layout ]]
- then
- if [[ -n $variant && -n $option ]]
- then
- setxkbmap -model $model -layout $layout -variant $variant -option $option
- elif [[ -n $variant && -z $option ]]
- then
- setxkbmap -model $model -layout $layout -variant $variant
- elif [[ -z $variant && -n $option ]]
- then
- setxkbmap -model $model -layout $layout -option $option
- elif [[ -z $variant && -z $option ]]
- then
- setxkbmap -model $model -layout $layout
- fi
- else
- keyboard=$(setxkbmap -query | grep -E 'layout|variant' | grep -oE '[^: ]+$' | tr '\n' ' ')
- setxkbmap ${keyboard}
- fi
+ layout_cmd
fi
# set help color