aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorepoch <epoch@enzo.thebackupbox.net>2021-11-14 04:30:12 +0000
committerepoch <epoch@enzo.thebackupbox.net>2021-11-14 04:30:12 +0000
commit74e3a7e1a9e9f2b24964403f2c2b75e1ddda3053 (patch)
treeaabec17e09eabe91b542f964016e30de956990a2
parente341a2a428ab30126af4148f5022b60be360a624 (diff)
downloaduritools-74e3a7e1a9e9f2b24964403f2c2b75e1ddda3053.tar.gz
uritools-74e3a7e1a9e9f2b24964403f2c2b75e1ddda3053.zip
xclip sometimes outputs an error if there is nothing to use in the buffer. nulling it so /real/ errors are easier to spot
-rwxr-xr-xurilaunch8
1 files changed, 6 insertions, 2 deletions
diff --git a/urilaunch b/urilaunch
index fc15323..5bf5b38 100755
--- a/urilaunch
+++ b/urilaunch
@@ -1,10 +1,14 @@
#!/bin/bash
#uristart.log /should/ already be uniq'd because of uristart's code now, but might as well not rely on it.
#you'll probably want to change my gopher-get line to be something useful to you.
+
+### xclip can return nothing and just error out sometimes with:
+### Error: target STRING not available
+
exec copy_start_nevermind.sh \
"$(cat \
- <(printf "%s\n" "$(xclip -o | head -n1)") \
- <(printf "%s\n" "$(xclip -o -selection clipboard | head -n1)") \
+ <(printf "%s\n" "$(xclip -o 2>/dev/null | head -n1)") \
+ <(printf "%s\n" "$(xclip -o -selection clipboard 2>/dev/null | head -n1)") \
<(xdotool getwindowfocus | xargs xwindowURI) \
<(printf "\n") \
<(gopher-get gopher://batou/0/links.txt) \