dot

packages and services management
Log | Files | Refs | README

commit 8481a8f7ad86f81f22060a0f929f719e42de4ac1
parent e1c76fa5023363bc5d7e7ac34825a78dd8950532
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon, 15 May 2017 08:40:33 +0200

Application.  Layer 11.

Diffstat:
Mbin/io | 3++-
Mbin/io-url | 48+++++++++++++++---------------------------------
Curl -> bookmarks | 0
Murl | 27---------------------------
4 files changed, 17 insertions(+), 61 deletions(-)

diff --git a/bin/io b/bin/io @@ -60,7 +60,8 @@ END { for (i = 0; i < filesc; i++) print(filesv[i] ); } ' "$CACHE/find" - + printf '# %s\n' url + cat "$ETC/url" } | iomenu -p io -s -h | cut -c 3-` command="io-${selection%% *}" diff --git a/bin/io-url b/bin/io-url @@ -1,46 +1,28 @@ -# open a link from $CONFIG/url appropritately +# open a url with appropriate programe -url="$({ - abduco | sed 's|.*\t||; y|!|/|' | grep '://' - printf '\n' - - cat "$GIT/gandi/url" - - printf '\n' - cat "$ETC/url" - -} | iomenu -s -p 'url')" - -name="$(printf %s "$url" | sed 's|/|!|g')" - -[ "$SSH_TTY" ] && e='^\' || e='^Z' - -case "$url" in +case "$1" in ( http://* | https://* ) - exec ${BROWSER:-chromium} "$url" & + exec ${BROWSER:-chromium} "$1" ;; ( ssh://* ) - ABDUCO="$name" exec abduco -e "$e" -A "$name" \ - ssh "${url#ssh://}" + exec ssh "${1#ssh://}" ;; ( gopher://* ) - ABDUCO="$name" exec abduco -e "$e" -A "$name" \ - cgo "$url" + exec cgo "$1" ;; ( irc://* ) - url="${url#irc://}" - case "$url" in + url=${1#irc://} + case "$1" in ( *:6697 ) port="-e ${url##*:}" ;; - ( *:* ) port="-p ${url##*:}" ;; - ( * | '' ) port='' ;; + ( *:* ) port="-p ${url##*:}" ;; + ( * | '' ) unset port ;; esac - url="${url%:*}" + url=${url%:*} - ABDUCO="$name" exec abduco -e "$e" -A "$name" \ - ii -i "${IRC:-$HOME/var/irc}" \ - -n "${NICK:-$USER}" \ - -f "$NAME" \ - -s "$url" \ - $port + exec ii -i "${IRC:-$HOME/var/irc}" \ + -n "${NICK:-$USER}" \ + -f "$NAME" \ + -s "$url" \ + $port ;; esac diff --git a/url b/bookmarks diff --git a/url b/url @@ -1,34 +1,7 @@ -# irc channels irc://irc.freenode.net:6697 irc://irc.oftc.net:6697 irc://unix.chat:6697 irc://irc.cyberia.is:6697 - -# gopher gopher://bitreich.org - -# ssh ssh://josuah@josuah.net ssh://josuahdemangeon@grex.org - -# learn - networking -http://calomel.org - -# communities -http://suckless.org -http://2f30.org -http://nixers.net -http://lobste.rs - -# blogs -http://gnu.moe - -# independent services -http://fuwafuwa.moe -http://mixtape.moe - -# news -http://thecontext.net - -# plain text text -http://lainzine.neocities.org/txt-releases/lainzine-3.txt