Open kristoferus75 opened 6 years ago
intressting if change to us keyboard > it works but after then i have a us keyboard also on xfce :-(
fix_layout=true
layout_cmd () { setxkbmap us }
That's clearly not satisfactory... What happens when you type setxkbmap de
in XFCE, and then autotype a password with rofi-pass
?
What about setxkbmap de <variant>
? (I don't know of all variants, so look them up)
Hi ! Here is the xdotool version on freebsd just for info (i think the same is also on my arch pc)
xdotool --v xdotool version 3.20180703.1
if i set :
fix_layout=true
layout_cmd () { setxkbmap us de or setxkbmap de us }
it works not really like it should :-( crazy
so what happens if you simply run xdotool type @
from a terminal?
it print me a q :-(
Sucks. https://github.com/jordansissel/xdotool/issues/97 this is the xdotool issue behind it and I don't think it will ever be resolved..
In theory one could force us layout in rofi-pass and then restore original layout at the end, but I played with this before and couldn't find a satisfying way to do this.
workaround with a small shell script :
#!/usr/bin/env bash
~/apps_freebsd/rofi-pass/rofi-pass
setxkbmap de
it works :-)
I wonder if we could do something like this to restore original layout:
#!/usr/bin/env bash
# get xkb options
readarray xkb < <(setxkbmap -query | sed -e 's/:/=/;s/ //g')
# apply stored settings
for option in "${xkb[@]}"; do
option=${option//$'\n'/}
export ${option%%=*}=${option#*=}
done
setxkbmap $layout $variant -option \"$option\" -model $model
comments?
looks better than my script :-)
It would be nice if there was some workaround, for example the equivalent of layout_cmd
that ran only just before typing text and another command to run after. I'd be fine defining the command to restore the original layout myself. Or maybe #165 as an option (which I'd prefer if possible).
@carnager looking at the diff between e07055a and 1ac845d, I'd suggest:
_dotool
wrapper to "translate" whatever we used to feed to xdotool
for ydotool
(_dotool key Tab
-> xdotool key Tab
or ydotool key tab
; etc.)xdotool_delay
-> ydotool_delay
It'll look like:
if command -v ydotool >/dev/null 2>&1; then
_dotool () {
# smart translator here
}
elif command -v xdotool >/dev/null 2>&1; then
_dotool () {
xdotool "$@"
}
else
# OH NO!
fi
Yeah, I am not planning to drop one or the other. There is a reason ydotool is on a separate branch right now :) Right now ydotool does some strange things on my local setup, which first need to be resolved anyway.
Hi !
I use rofi-pass in arch linux and it works perfect thanks ! i want it also use on my freebsd but i have the problem that if i copy username & password the "@" is paste as "q" character !
i use this in my config file
also if i start "setxkbmap de" before start rofi-pass in commandline it doesnt help :-(
Thanks for help !
kind regards
kristoferus