diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-20 12:01:39 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-20 12:01:39 +0200 |
commit | 947f7df73f16981f170265a64a964142fc617023 (patch) | |
tree | 75c7f8560539303e4a5c1f93241a1e8912bad4cc /bin/guiscripts/osurftxts | |
parent | ff6c38d3364165a7bae431888a87aab1e53a80b9 (diff) |
checkpoint
Diffstat (limited to 'bin/guiscripts/osurftxts')
-rwxr-xr-x | bin/guiscripts/osurftxts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/guiscripts/osurftxts b/bin/guiscripts/osurftxts new file mode 100755 index 0000000..ef60166 --- /dev/null +++ b/bin/guiscripts/osurftxts @@ -0,0 +1,22 @@ +#!/bin/sh + +# open all links in txt file into one tabbed surf + +# dependencies: surf, osurf, dmenu + +# $1: file path for non interactive use +if [ -z "$1" ] +then + d="$HOME/dl/txtabs" + f="$(find "$d" -type f -printf '%f\n' | dmenu)" + [ "$f" ] || exit 1 + f="$d"/"$f" +else + [ -f "$1" ] || exit 1 + f="$1" +fi + +winid="$(osurf "$(head -n 1 "$f")")" +tail -n +2 "$f" | while read -r url; + do surf -e "$winid" "$url" & + done |