From 87dd9c7e8c87c681b9808083448cd546880ebf3b Mon Sep 17 00:00:00 2001 From: epoch Date: Fri, 6 Apr 2018 02:06:20 -0500 Subject: added printfurl and start tools and ignore file. and example config. --- .gitignore | 2 ++ printfurl | 5 +++++ start | 4 ++++ start.conf.example | 2 ++ 4 files changed, 13 insertions(+) create mode 100644 .gitignore create mode 100755 printfurl create mode 100755 start create mode 100644 start.conf.example diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..805d9dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +matchurl +cuturl diff --git a/printfurl b/printfurl new file mode 100755 index 0000000..3da61a6 --- /dev/null +++ b/printfurl @@ -0,0 +1,5 @@ +#!/bin/sh +cutargs="$(printf "%s\n" "$1" | tr '%' '\n' | tail -n+2 | sed 's/^\(.\).*/-\1/g')" +printfargs="$(printf "%s\n" "$1" | sed 's/%./%s/g')" +#printf "printfargs: %s\n" "$printfargs" +cuturl $cutargs | tr '\n' ' ' | xargs -L1 printf "$printfargs" diff --git a/start b/start new file mode 100755 index 0000000..d21a799 --- /dev/null +++ b/start @@ -0,0 +1,4 @@ +#!/bin/sh +scheme="$(printf "%s\n" "$1" | cuturl -s)" +line="$(grep "^${scheme}:" ~/.config/start.conf | cut -d: -f2-)" +printf "%s\n" "$1" | printfurl "$line" | sh diff --git a/start.conf.example b/start.conf.example new file mode 100644 index 0000000..372df97 --- /dev/null +++ b/start.conf.example @@ -0,0 +1,2 @@ +finger:printf "%p\n" | ncat "%d" 79 | tr -d '\r' | xmessage -file - +http:dillo %U -- cgit v1.2.3