aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-08-22 13:23:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-08-22 13:23:07 -0300
commit805f3ecc55897fe28d7054ecf7b29101582ceb75 (patch)
tree81d2146331eeed89376a140ed1b541ba871051a4
parent46a0dc019b1e80a524d183168e47048b253348fe (diff)
downloadkeyringer-805f3ecc55897fe28d7054ecf7b29101582ceb75.tar.gz
keyringer-805f3ecc55897fe28d7054ecf7b29101582ceb75.tar.bz2
Fix(xclip): avoid 'Error: target STRING not available' (4)
-rwxr-xr-xlib/keyringer/actions/xclip4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/keyringer/actions/xclip b/lib/keyringer/actions/xclip
index d1d85b5..ff82cc1 100755
--- a/lib/keyringer/actions/xclip
+++ b/lib/keyringer/actions/xclip
@@ -16,14 +16,14 @@ clip() {
#local xclip="xclip -selection clipboard"
local xclip="xclip"
- before="$($xclip -o | base64)"
+ before="$($xclip -o 2> /dev/null | base64)"
# Avoid "Error: target STRING not available"
# https://github.com/astrand/xclip/issues/38
echo "$RANDOM" | $xclip &> /dev/null
# Copy text into clipboard
- echo -n "$1" | $xclip
+ echo -n "$1" | $xclip &> /dev/null
# Cleanup procedure
(