From 6f8e1d46c7c0d1d6084f47ce8995666e41aac06c Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Tue, 18 May 2021 17:58:24 +0200 Subject: [PATCH] Add wayland support ot pbc and pbp --- tree/.local/bin/pbc | 6 +++++- tree/.local/bin/pbp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tree/.local/bin/pbc b/tree/.local/bin/pbc index 3ea44e4..a3f335e 100755 --- a/tree/.local/bin/pbc +++ b/tree/.local/bin/pbc @@ -1,3 +1,7 @@ #!/usr/bin/env sh -xsel --clipboard --input +if [ "$XDG_SESSION_TYPE" == "wayland" ]; then + wl-copy +else + xsel --clipboard --input +fi diff --git a/tree/.local/bin/pbp b/tree/.local/bin/pbp index b9661d8..e898859 100755 --- a/tree/.local/bin/pbp +++ b/tree/.local/bin/pbp @@ -1,2 +1,6 @@ #!/usr/bin/env sh -xsel --clipboard --output +if [ "$XDG_SESSION_TYPE" == "wayland" ]; then + wl-paste -n +else + xsel --clipboard --output +fi