echo $2 > "$1"/file/get &
cat "$1"/file/out > $tmp
mv $tmp $2.tar
-echo $2.tar
-tar tvf $2.tar
+tar tvf $2.tar >&2
+realpath $2.tar
+echo -n "x it?"
+read foo
tar xf $2.tar
--- /dev/null
+#!/bin/sh -e
+
+fileId=$(tmux show-buffer |
+ sed -n 's/^.*\[FILE\] \(.*\) (\(.*\))$/\1 \2/p' |
+ fzf |
+ cut -d" " -f1)
+[ -n "$fileId" ]
+tmux delete-buffer
+cmd="$(dirname "$(realpath -- "$0")")"
+state="$PWD"
+cd /tmp
+$cmd/dl "$state" $fileId
+echo extracted
+read foo
mkdir -p users
rm -f debug users/status
mkfifo debug users/status
-[ -s tmux.conf ] || sed "s#NEWWIN#$cmd/newwin# ; s#CATFILE#$cmd/catfile#" < "$cmd"/tmux.conf > tmux.conf
+[ -s tmux.conf ] || sed \
+ -e "s#NEWWIN#$cmd/newwin#" \
+ -e "s#CATFILE#$cmd/catfile#" \
+ -e "s#DLPANE#$cmd/dlpane#" < "$cmd"/tmux.conf > tmux.conf
$TMUX -f tmux.conf new-session -d -n ROOT -s mmc "cat debug | tai64n | tai64nlocal"
$TMUX split-window -h 'while : ; do cat users/status | spc -e grn,"^O:.*" -e cya,"^A:.*" ; sleep 5 ; clear ; done'
$TMUX split-window -v "$cmd/mmc/mmc -debug debug -user-status users/status -newwin $cmd/newwin -notify $cmd/notify | tai64n | tai64nlocal"
bind-key c new-window NEWWIN
bind-key d kill-window
bind-key S new-window CATFILE
+bind-key D {
+ capture-pane -t 0
+ new-window DLPANE
+}
bind-key -n C-PgUp previous-window
bind-key -n C-PgDn next-window
R tmux -f tmux.conf
R tail -f debug | tai64n
R for { cat users/status ; sleep 5 }
- R fzf **(/) | cmd/newwin
- R cmd/catfile
- R fzf **(.) | fmt
R cmd/mmc | tai64n
F users/status
F users/.../{id,email,name,|in,out.rec,|status,last}
R cmd/rd < .../out.rec | spc
R cmd/wr
R for { rlwrap cat > .../in }
+ R fzf **(/) | cmd/newwin
+ R tmux capture-pane | fzf | cmd/dl
+ R cmd/catfile
+ R fzf **(.) | fmt
-cmd/download
+cmd/dl
R echo ... > file/get
R tar xf < file/out
@end itemize
-Outside that running @command{tmux} user can use @command{cmd/download}
+Outside that running @command{tmux} user can use @command{cmd/dl}
utility to download specified file's identifier. It sends it identifier
to @file{file/get} and reads the archive with that file from
@file{file/out}. File is sent inside
threading meta information in both human and machine friendly format.
@item Ability to send and retrieve files. Multiline messages support.
@item All channels refreshing after the login.
+@item Keybindings for quick channel opening, window selection,
+information viewing and file downloading.
@end itemize
@command{mmc} is
@item By pressing @code{Prefix+S}, list of available files is shown
inside @command{fzf}, just to quickly display it.
+@item By pressing @code{Prefix+D}, list of available file links in
+current window is shown. Choose the desired one and it will be saved in
+@file{/tmp} directory.
+
@item Status change and typing notifications are shown as a short-lived
message at the bottom of the screen.
@code{/FILE /path/to/file} message.
@item If you want to download some file, then you can invoke
-@command{cmd/download FILEID} utility, that will save the file to
-@file{FILEID.tar} archive in current directory.
+@command{cmd/dl path/to/state FILEID} utility, that will save the file
+to @file{FILEID.tar} archive in current directory and extract it.
@item After you just logged in, @command{cmd/mmc} checks for new
messages since you were offline, if any messages were in the state's