Compare commits

...

2 Commits

Author SHA1 Message Date
Vincent Riquer
9d24be962b progressSpin: better progress
Show number of stuff updated
Updates every 100 stuff
2025-01-23 00:29:28 +01:00
Vincent Riquer
0ce0d18ab8 atom: indent fix 2025-01-23 00:26:48 +01:00
2 changed files with 22 additions and 12 deletions

24
atom
View File

@ -712,19 +712,19 @@ do
then
concurrency="$fixed_workers"
else
if [ -z "$quit" ] \
&& (( ! pause )) \
&& (( $(date +%s)-concurrencychange >= loadinterval ))
then
if (( concurrency > 1 )) \
&& (( load > maxload ))
if [ -z "$quit" ] \
&& (( ! pause )) \
&& (( $(date +%s)-concurrencychange >= loadinterval ))
then
concurrencychange=$(date +%s)
(( --concurrency ))
elif (( load < maxload )) && (( active > concurrency - 1 ))
then
concurrencychange=$(date +%s)
(( ++concurrency ))
if (( concurrency > 1 )) \
&& (( load > maxload ))
then
concurrencychange=$(date +%s)
(( --concurrency ))
elif (( load < maxload )) && (( active > concurrency - 1 ))
then
concurrencychange=$(date +%s)
(( ++concurrency ))
fi
fi
fi

View File

@ -11,5 +11,15 @@ progressSpin() {
30) echo -n $'\b\\' ;;
*) ;;
esac
if ! (( count % 100 ))
then
echo -n " $count"
until (( backspace > ${#count} ))
do
(( backspace++ ))
echo -n $'\b'
done
unset backspace
fi
fi
}