diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2023-12-23 11:15:09 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2023-12-23 11:15:09 -0500 |
| commit | 11aef457cbe233fc0fd87e411415b3fb8fb8a900 (patch) | |
| tree | f2718522cfc058f62e6dc5e0d645b94fc5f55e18 | |
| parent | e2083fe8d58f73a03f072eeeb6cf7f267c10735c (diff) | |
| download | dpw-11aef457cbe233fc0fd87e411415b3fb8fb8a900.tar.gz dpw-11aef457cbe233fc0fd87e411415b3fb8fb8a900.tar.xz | |
Add support for wayland and wl-copy
| -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 } |
