From 7d3dc968b6183f51dc2594c80450372f0c8fb811 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 23 Dec 2024 10:01:15 +0100 Subject: Changes for new laptop --- open-stdin | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'open-stdin') diff --git a/open-stdin b/open-stdin index 5c0ee1e..a1e10b5 100755 --- a/open-stdin +++ b/open-stdin @@ -1,12 +1,12 @@ #!/bin/sh -# Saves standard input in a download folder and opens it (spawn) +# Saves standard input in a temporary file and opens it (spawn) # Usage: open-stdin -# Requires: open-file +# Requires: open-file (or set $OPENER to e.g. xdg-open) -#folder=$HOME/Downloads/open-stdin folder=${TMPDIR:-/tmp} +open=${OPENER:-open-file} tempfile=$(mktemp -p "$folder") -cat > "$tempfile" && open-file $@ "$tempfile" +cat > "$tempfile" && $open $@ "$tempfile" -- cgit v1.3