improve copy indicator
This commit is contained in:
parent
c6fa749f0c
commit
5439c4af71
1 changed files with 13 additions and 7 deletions
|
@ -98,14 +98,20 @@ cmd paste &{{
|
|||
mode="$1"
|
||||
shift
|
||||
case "$mode" in
|
||||
copy)
|
||||
rsync -aP --del -- "$@" . |
|
||||
stdbuf -i0 -o0 -e0 tr '\r' '\n' |
|
||||
while IFS= read -r line; do
|
||||
lf -remote "send $id echo $line"
|
||||
copy)
|
||||
rsync -aP --del -- "$@" . &
|
||||
i=0
|
||||
while ps -p "$!" >/dev/null; do
|
||||
i=$(((i + 1) % 3))
|
||||
dots=""
|
||||
for i in $(seq 0 $i); do
|
||||
dots="${dots}."
|
||||
done
|
||||
;;
|
||||
move) mv -n -- "$@" .;;
|
||||
lf -remote "send $id echo 'Copying$dots'"
|
||||
sleep 0.3
|
||||
done
|
||||
;;
|
||||
move) mv -n -- "$@" . ;;
|
||||
esac
|
||||
rm ~/.local/share/lf/files
|
||||
lf -remote "send clear"
|
||||
|
|
Loading…
Add table
Reference in a new issue