diff options
| -rwxr-xr-x | dpw | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -25,7 +25,12 @@ Darwin) pbcopy ;; *) - xclip -selection "$PASSWORD_STORE_X_SELECTION" + case $XDG_SESSION_TYPE in + wayland) + wl-copy ;; + *) + xclip -selection "$PASSWORD_STORE_X_SELECTION" ;; + esac :; esac } @@ -37,8 +42,14 @@ Darwin) printf '' | pbcopy" & ;; *) - sh -c "sleep ${PASSWORD_STORE_CLIP_TIME}; + case $XDG_SESSION_TYPE in + wayland) + sh -c "sleep ${PASSWORD_STORE_CLIP_TIME}; wl-copy -c " & ;; + *) + sh -c "sleep ${PASSWORD_STORE_CLIP_TIME}; printf '' | xclip -selection '$PASSWORD_STORE_X_SELECTION'" & + ;; + esac :; esac } |
