diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-06 15:00:58 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-06 15:00:58 +0200 |
commit | d6a3c1019f833a8236b51244e799b804cc9d90d3 (patch) | |
tree | 1ed18c7746aed015299920af19f5c642e3966368 /bin/common/ytclipo | |
parent | 09bdbac4c38674b4a104be7d6d213776861ad20a (diff) |
made ytclipo wayland sensible
Diffstat (limited to 'bin/common/ytclipo')
-rwxr-xr-x | bin/common/ytclipo | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/common/ytclipo b/bin/common/ytclipo index e97cb94..672633a 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -1,7 +1,13 @@ #!/bin/sh # argument ($1) -> clipboard -> stdin -test -z "${inp:=${1:-"$(xclip -sel c -o)"}}" && +if [ "$WAYLAND_DISPLAY" ] +then + paste="$(wl-paste)" +else + paste="$(xclip -o -sel c)" +fi +test -z "${inp:=${1:-$paste}}" && inp="$(cat /dev/stdin)" # take last link from clipboard |