aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdpw15
1 files changed, 13 insertions, 2 deletions
diff --git a/dpw b/dpw
index d21f8f5..67ee242 100755
--- a/dpw
+++ b/dpw
@@ -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
}