diff options
| -rwxr-xr-x | dpw | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -102,6 +102,7 @@ copy() { pth="$1"; shift "${DPW_BACKEND}" show "$pth" \ | sed 1q \ + | tr -d '\n' \ | xclip -selection "$PASSWORD_STORE_X_SELECTION" sh -c "sleep ${PASSWORD_STORE_CLIP_TIME}; @@ -112,6 +113,7 @@ _type() { pth="$1"; shift "${DPW_BACKEND}" show "$pth" \ | sed 1q \ + | tr -d '\n' \ | xdotool type --delay 2ms --clearmodifiers --file - } @@ -194,13 +196,16 @@ case $a in show) $OTP "$authstring" ;; copy) $OTP "$authstring" \ + | tr -d '\n' \ | xclip -selection "$PASSWORD_STORE_X_SELECTION" sh -c "sleep ${PASSWORD_STORE_CLIP_TIME}; echo '' | xclip -selection '$PASSWORD_STORE_X_SELECTION'" & ;; - type) $OTP "$authstring" | xdotool type --delay 2ms \ - --clearmodifiers --file - + type) + $OTP "$authstring" \ + | tr -d '\n' \ + | xdotool type --delay 2ms --clearmodifiers --file - ;; esac } |
