dot

packages and services management
Log | Files | Refs | README

commit b53d3551370d241286006f0414d633d5754bd66e
parent 89256c4a84eca40b2d66e4e29e2183d6c6fd597b
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 21 May 2017 18:30:53 +0200

Communication.  Layer 14

Diffstat:
Mbin/ii-filter-3 | 13++++++-------
Dbin/ii-log | 33---------------------------------
Mbin/io-irc | 2+-
Mbin/prompt | 2+-
Murl | 1+
5 files changed, 9 insertions(+), 42 deletions(-)

diff --git a/bin/ii-filter-3 b/bin/ii-filter-3 @@ -1,6 +1,7 @@ # http://tools.suckless.org/ii awk ' + BEGIN { WIDTH = 80 - 17; } @@ -23,24 +24,23 @@ date != last { if (nick != $3) { printf("\n"); - printf("%s %10s ", $2, $3); + printf("%s %10s ", $2, $3); nick = $3; } else { - printf("%s %10s ", $2, ""); + printf("%s %10s ", $2, ""); } sub("[^ ]* [^ ]* [^ ]* ", ""); - } else { - printf("%s %10s ", $2, ""); + printf("%s %10s ", $2, ""); sub("[^ ]* [^ ]* ", ""); } sub("^\001ACTION ", "~~ "); sub("\001$", " ~~"); - for (offset = 0; length($0) > 0; offset = 17) { + for (offset = 0; length($0) > 0; offset = 18) { row = substr($0, 1, WIDTH); if (length(row) >= WIDTH) @@ -51,5 +51,4 @@ date != last { printf("%" offset "s%s\n", "", row); } -} -' "$@" +}' diff --git a/bin/ii-log b/bin/ii-log @@ -1,33 +0,0 @@ -# split ii `out' directories to multiple files named date - -find "${IRC:-$HOME/irc}" -name out -type f | - -xargs awk -v today=`date +%Y-%m-%d` ' - -FILENAME ~ /out$/ { - LASTNAME = FILENAME; - sub("out$", "", FILENAME); - - if (LASTNAME) printf("%s", out) > LASTNAME; - out = ""; -} - -$1 == today { - out = out $0 "\n"; -} - -$1 != today && $1 { - date = $1 - - sub(/^[^ ]* /, ""); - - while (sub("\002", "\033[1m")) - sub("\002", "\033[m"); - - print >> FILENAME date; -} - -END { - printf("%s", out) > LASTNAME; - -}' diff --git a/bin/io-irc b/bin/io-irc @@ -2,7 +2,7 @@ [ -d "$1" ] || exit 1 -tail -f -n 40 "$1/out" | ii-filter-3 & +tail -n 40 -f "$1/out" | ii-filter-3 & while IFS='' read -r line do diff --git a/bin/prompt b/bin/prompt @@ -1,6 +1,6 @@ printf '\033[m\n' -printf '[%s] %s@%s %s/' "`date +%H:%M`" "$USER" "`hostname`" "$PWD" +printf '[%s] %s %s/' "`date +%H:%M`" "`hostname`" "$PWD" for i in "`git-status`" "${ABDUCO}" "${1#0}" do diff --git a/url b/url @@ -7,5 +7,6 @@ gopher://bitreich.org gopher://z3bra.org gopher://r-36.net gopher://gopherproject.org +gopher://port70.net ssh://josuah@josuah.net ssh://josuahdemangeon@grex.org