dot

packages and services management
Log | Files | Refs | README

commit cc833c987dab1f499a1e6346ce90ba490ccd7608
parent 427d6a9faf36eb08e5cc0c5d5cc6adbac9137654
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 29 Apr 2017 11:19:25 +0200

ii-less: a ii pager

Diffstat:
Mbin/ii-filter | 10+++++-----
Abin/ii-less | 3+++
Mbin/io-url | 8++++++--
3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/bin/ii-filter b/bin/ii-filter @@ -1,7 +1,7 @@ busybox awk ' BEGIN { - NICK_COL = 10; + NICK_COL = 14; TEXT_COL = 80 - NICK_COL - length(" "); } @@ -36,9 +36,9 @@ BEGIN { } if (nick != lastnick) - printf("%-" NICK_COL "s │\n", date); + printf("%-" NICK_COL "s│\n", ""); - printf("%" NICK_COL "s │", + printf("%" NICK_COL "s│", (nick != lastnick && nick != "-!-") ? nick : ""); for (first = 1; length($0) >= TEXT_COL; first = 0) { @@ -47,13 +47,13 @@ BEGIN { $0 = substr($0, length(line) + 2); if (!first) - printf("%" NICK_COL "s │", ""); + printf("%" NICK_COL "s│", ""); print(line); } if (!first) - printf("%" NICK_COL "s │", ""); + printf("%" NICK_COL "s│", ""); print($0); diff --git a/bin/ii-less b/bin/ii-less @@ -0,0 +1,3 @@ + + +find "${IRC:-HOME/var/irc}" -name out -type f | sort | xargs busybox less -m diff --git a/bin/io-url b/bin/io-url @@ -18,7 +18,11 @@ case "$url" in ;; ( irc://* ) ABDUCO="$name" exec abduco -e "$e" -A "$name" \ - ii -i "$HOME/var/irc" -e 6697 -n "${NICK:-$USER}" -f "$NAME" \ - -s "${url#irc://}" + ii \ + -i "${IRC:-$HOME/var/irc}" \ + -n "${NICK:-$USER}" \ + -f "$NAME" \ + -s "${url#irc://}" \ + -e 6697 ;; esac