dot

packages and services management
Log | Files | Refs | README

commit e7b8677a8298f805bfcc5412dc332465ef6cffa9
parent cc833c987dab1f499a1e6346ce90ba490ccd7608
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 29 Apr 2017 12:07:07 +0200

Society.  Layer 07

Diffstat:
Mbin/ii-filter | 2+-
Dbin/ii-less | 3---
Abin/io-ii-less | 12++++++++++++
Abin/io-ii-talk | 9+++++++++
Mbin/io-run | 14+++++++++++++-
Murl | 7+++++--
6 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/bin/ii-filter b/bin/ii-filter @@ -36,7 +36,7 @@ BEGIN { } if (nick != lastnick) - printf("%-" NICK_COL "s│\n", ""); + printf("%-" NICK_COL "s│\n", date); printf("%" NICK_COL "s│", (nick != lastnick && nick != "-!-") ? nick : ""); diff --git a/bin/ii-less b/bin/ii-less @@ -1,3 +0,0 @@ - - -find "${IRC:-HOME/var/irc}" -name out -type f | sort | xargs busybox less -m diff --git a/bin/io-ii-less b/bin/io-ii-less @@ -0,0 +1,12 @@ +# a pager to browse ii channels + +name='.' + +while [ "$name" ] +do + name="$( + find "${IRC:-$HOME/var/irc}" -mindepth 1 -type d | iomenu -p ii + )" + + [ -f "$name/out" ] && tail -f -n 1000 "$name/out" | ii-filter | less +done diff --git a/bin/io-ii-talk b/bin/io-ii-talk @@ -0,0 +1,9 @@ +# Send a message to a channel + +dir="$(find "${IRC:-$HOME/var/irc}" -type p | sed 's/in$//' | iomenu -p talk)" +[ -d "$dir" ] || exit 1 + +printf '\033[7m message \033[m ' +read message + +[ "$message" ] && printf '%s\n' "$message" >> "$dir/in" diff --git a/bin/io-run b/bin/io-run @@ -1,3 +1,15 @@ # prompt for a programs to run -exec $(IFS=:; stest -flx $PATH | sort -u | iomenu) +command="$({ + printf '# ' + abduco | sed 's/.*\t//' | sed 's|!|/|g' + + printf '# Commands\n' + IFS=:; stest -flx $PATH | sort -u + } | iomenu -s -p run +)" +name="$(printf %s "$command" | sed 's|/|!|')" +[ "$SSH_TTY" ] && e='^\' || e='^Z' + +command -v "${command%% *}" && +ABDUCO="$name" exec abduco -e "$e" -A "$name" $command diff --git a/url b/url @@ -17,11 +17,14 @@ http://mixtape.moe # News http://thecontext.net +# Plain text text +http://lainzine.neocities.org/txt-releases/lainzine-3.txt + # IRC channels irc://irc.freenode.net irc://irc.oftc.net irc://unix.chat irc://irc.cyberia.is -# Plain text text -http://lainzine.neocities.org/txt-releases/lainzine-3.txt +# Gopher +gopher://bitreich.org