diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2021-10-25 17:55:04 -0400 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2021-10-25 17:55:04 -0400 |
| commit | 04154746f58048bf08368b6b71a7950ad7271cc3 (patch) | |
| tree | b2e7c8d062f1282209ecaf9be20a268e14dfc3fb | |
| parent | 5a346ab4650f37b1e5d47fc8975354eb248fa3b5 (diff) | |
| download | dpw-04154746f58048bf08368b6b71a7950ad7271cc3.tar.gz dpw-04154746f58048bf08368b6b71a7950ad7271cc3.tar.xz | |
Remove '\n' from typed/copied passwds and otps
| -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 } |
