dot

packages and services management
Log | Files | Refs | README

commit cb7464cae29c83fa7964b1638d741604f9aaf60d
parent 00b197c14cf0b4dfda53e9bd30d44545d44b1e3f
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 14 Dec 2017 22:20:15 +0100

connecting ii to a client and xdg-open

Diffstat:
Mbin/ii-client | 2+-
Mbin/io | 5+----
Abin/io-uri | 3+++
Mbin/l | 1+
Mbin/mblaze-filter | 3++-
Mbin/xdg-open | 54++++++++++++++++++++++++++++++------------------------
6 files changed, 38 insertions(+), 30 deletions(-)

diff --git a/bin/ii-client b/bin/ii-client @@ -1,5 +1,5 @@ #!/bin/sh -# Simple tiny ii client using eel(1) and iomenu(1). +# Simple tiny ii client using eel(1) for formatting and iomenu(1) for selection. IRCPATH=$HOME/var/irc INPUT=$HOME/.cache/ii-client diff --git a/bin/io b/bin/io @@ -2,14 +2,11 @@ export LC_COLLATE=C -[ $# -eq 0 ] && set -- "${IO#$HOME/}" - name=$({ xdg-open printf -- '#----------------------------------------' printf -- '----------------------------------------\n' - find "$HOME/$@" '(' -name .git -o -name CVS ')' -prune -o -print | sort - cat "$HOME/etc/lib/uri" + find "$PWD" '(' -name .git -o -name CVS ')' -prune -o -print | sort } | iomenu -# | cut -f 2) clear diff --git a/bin/io-uri b/bin/io-uri @@ -0,0 +1,3 @@ +#!/bin/sh + +exec xdg-open "$(cat "$HOME/etc/lib/uri" | iomenu -# -p uri | cut -f 2)" diff --git a/bin/l b/bin/l @@ -1,3 +1,4 @@ #!/bin/sh +pwd ls -Alp "$@" diff --git a/bin/mblaze-filter b/bin/mblaze-filter @@ -31,9 +31,10 @@ freebsd.org "From" ~~~ "*freebsd.org*" fsf.org "From" ~~~ "*fsf.org*" gandi.net "From" ~~~ "*gandi.net*" github.com "From" ~~~ "*github.com*" +gobolinux.org "List-Id" ~~~ "*gobolinux.org*" google.com "From" ~~~ "*google.com*" gopherproject.org "List-Id" ~~~ "*gopher-project*" -grifon.fr "List-Id" ~~~ "*@grifon.fr*" +grifon.fr "List-Id" ~~~ "*grifon.fr*" keybase.io "From" ~~~ "*keybase.io*" lobste.rs "From" ~~~ "*@lobste.rs*" netsukuku.freaknet.org "List-Id" ~~~ "*netsukuku.lists.dyne.org*" diff --git a/bin/xdg-open b/bin/xdg-open @@ -82,8 +82,21 @@ EOF #--- hierarchical uri ---------------------------------------------------------- case $scheme in -(news|nntp) - aexec retawq "$1" +(9p) + dir=$HOME/var/9p/$address + mkdir -p "$dir" + aexec doas 9pfs "$address" "$dir" + ;; +(ftp) + aexec ftp "$1" + ;; +(git) + mkdir -p "$HOME/git" + cd "$HOME/git" || exit 1 + aexec git clone "$1" + ;; +(gopher) + aexec sacc "$1" ;; (http|https) for b in retawq firefox chromium chromium-browser chrome x-www-browser @@ -91,16 +104,14 @@ case $scheme in done aexec "$b" "$1" ;; -(gopher) - aexec sacc "$1" +(irc) + [ "$port" = . ] && port=6667 + mkdir -p "$HOME/var/irc/$host" "$HOME/var/log/ii/" + exec ii -s "$host" -i "$HOME/var/irc" -p "$port" -k PASS -f "$NAME" \ + > "$HOME/var/irc/$host/log" 2> "$HOME/var/log/ii/$host" & ;; -(ssh) - address=${1#*://} - address=${address%:*} - if [ "$port" = . ] - then aexec ssh "$address" - else aexec ssh -p "$port" "$address" - fi +(news) + aexec retawq "$1" ;; (sftp) address=${1#*://} @@ -109,18 +120,13 @@ case $scheme in then aexec sftp "$address" else aexec sftp -p "$port" "$address" fi -(ftp) - aexec ftp "$1" - ;; -(9p) - dir=$HOME/var/9p/$address - mkdir -p "$dir" - aexec doas 9pfs "$address" "$dir" - ;; -(git) - mkdir -p "$HOME/git" - cd "$HOME/git" || exit 1 - aexec git clone "$1" +(ssh) + address=${1#*://} + address=${address%:*} + if [ "$port" = . ] + then aexec ssh "$address" + else aexec ssh -p "$port" "$address" + fi ;; (telnet) address=${1#telnet://} @@ -166,7 +172,7 @@ esac (*.o|*.a) aexec radare2 "$1" ;; -(*/music/*|*.opus|*.mp3|*.flac) +(*bandcamp.com*|*/music/*|*.opus|*.mp3|*.flac) aexec play "$1" ;; esac