aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-07-25 13:25:15 +0200
committerRasmus Steinke <rasi@xssn.at>2015-07-25 13:25:15 +0200
commit9dfcfe2e5535a4472dafe72663bad80a7cae5268 (patch)
tree4bafe35c30248da3413972a598dc65dd0d245533
parent2c8ecf5b6848ad63182a0c86a5eabf369fe710cd (diff)
downloadrofi-pass-9dfcfe2e5535a4472dafe72663bad80a7cae5268.tar.gz
made xdotool read password from stdin. workaround for https://github.com/jordansissel/xdotool/issues/72
-rwxr-xr-xrofi-pass7
1 files changed, 5 insertions, 2 deletions
diff --git a/rofi-pass b/rofi-pass
index 5ffb86d..659646b 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -81,7 +81,7 @@ ${open_url}: Open URL | ${copy_name}: Copy Username | ${copy_pass}: Copy Passwor
xdotool_type "${stuff[${USERNAME_field}]}"
exit
elif [[ $rofi_exit -eq 12 ]]; then
- xdotool_type "$password"
+ pass show "$selected_password" | head -1 | tr -d '\n' | xdotool type --clearmodifiers --file -
exit
elif [[ $rofi_exit -eq 14 ]]; then
echo -n "${stuff[${USERNAME_field}]}" | xclip
@@ -108,7 +108,8 @@ ${open_url}: Open URL | ${copy_name}: Copy Username | ${copy_pass}: Copy Passwor
if [[ -z "${stuff["$AUTOTYPE_field"]}" ]]; then
xdotool_type "${stuff[${USERNAME_field}]}"
xdotool key Tab
- xdotool_type "$password"
+ pass show "$selected_password" | head -1 | tr -d '\n' | xdotool type --clearmodifiers --file -
+ #xdotool_type "$password"
sleep 1
if [[ ${auto_enter} == "true" ]]; then
xdotool key Return
@@ -117,6 +118,8 @@ ${open_url}: Open URL | ${copy_name}: Copy Username | ${copy_pass}: Copy Passwor
for word in ${stuff["$AUTOTYPE_field"]}; do
if [[ $word == ":tab" ]]; then
xdotool key Tab
+ elif [[ $word == "pass" ]]; then
+ pass show "$selected_password" | head -1 | tr -d '\n' | xdotool type --clearmodifiers --file -
else
xdotool_type "${stuff[${word}]}"
fi