Compare commits
No commits in common. "6f428d6a63c0ec5b8c4a1149223b1e15d9743dbc" and "e01cb272cb3b5aa733cda0fb1ee0c849f21ee12a" have entirely different histories.
6f428d6a63
...
e01cb272cb
2 changed files with 15 additions and 56 deletions
|
@ -48,7 +48,7 @@ available env vars to configure:
|
|||
IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)
|
||||
SIZE(int), TEXT(string), FONTSIZE(int), BGCOLOR(hex), COLOR(hex)
|
||||
BORDERCOLOR(hex), X(int), Y(int), X_MAX(int), Y_MAX(int), H(int), W(int)
|
||||
RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int), LARGE(bool)
|
||||
RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int)
|
||||
```
|
||||
|
||||
Running on my Ryzen 4700G with [wellenbrecher](https://github.com/bits0rcerer/wellenbrecher) 1280x720 and three workers,
|
||||
|
|
|
@ -294,19 +294,17 @@ flootworker()
|
|||
{
|
||||
while true
|
||||
do
|
||||
if [ $LARGE ]
|
||||
then
|
||||
xymode
|
||||
echo "$OFFSET"
|
||||
for i in $(seq 0 $1 | shuf)
|
||||
do
|
||||
echo "${LOL[$i]}"
|
||||
done
|
||||
else
|
||||
xymode
|
||||
echo "$OFFSET
|
||||
${LOL[$1]}"
|
||||
fi
|
||||
#FLOOTSRUNNING=$((FLOOTSRUNNING+1))
|
||||
#test $FLOOTSRUNNING -le $FLOOTFORKS &&
|
||||
|
||||
xymode
|
||||
echo "$OFFSET
|
||||
${LOL[$1]}" #> /dev/tcp/$IPFLOOT/$FLOOTPORT || message warn "transmission in worker ${YELLOW}$1${ENDCOLOR} ${RED}failed${ENDCOLOR} - maybe you need to decrease ${YELLOW}FLOOTFORKS${ENDCOLOR} or expand/tune your uplink"
|
||||
#FLOOTSRUNNING=$((FLOOTSRUNNING-1))
|
||||
#echo "${LOL[$i]}" > /dev/tcp/127.0.0.1/1337 &
|
||||
|
||||
#echo "worker $i PID ${LOLPID[$i]}"
|
||||
|
||||
done > /dev/tcp/$IPFLOOT/$FLOOTPORT || message warn "transmission in worker ${YELLOW}$1${ENDCOLOR} ${RED}failed${ENDCOLOR} - maybe you need to decrease ${YELLOW}FLOOTFORKS${ENDCOLOR} or expand/tune your uplink"
|
||||
}
|
||||
|
||||
|
@ -322,34 +320,6 @@ checkfile() {
|
|||
|
||||
loadLOL() {
|
||||
|
||||
# when LARGE true, then we slize the large pixlist into smaller pieces
|
||||
# max 64k each one
|
||||
if [ $LARGE ]
|
||||
then
|
||||
LOL_org="$(echo "$LOL_org" | shuf)"
|
||||
LOLFIELDSIZE=64000
|
||||
# line counter
|
||||
L=1
|
||||
LINES="$(echo "$LOL_org" | wc -l )"
|
||||
LOLFIELDS="$(( ( $LINES / $LOLFIELDSIZE ) ))"
|
||||
message "LARGE mode: slicing ${YELLOW}${IMGFILE}${ENDCOLOR} - ${YELLOW}${LINES}${ENDCOLOR} into ${YELLOW}${LOLFIELDS}${ENDCOLOR} fields"
|
||||
|
||||
i=0
|
||||
while [ $i -le $LOLFIELDS ]
|
||||
do
|
||||
LN=$(($L+$LOLFIELDSIZE+1))
|
||||
message "field ${YELLOW}${i}${ENDCOLOR}, lines ${YELLOW}${L}${ENDCOLOR} - ${YELLOW}${LN}${ENDCOLOR}"
|
||||
LOL[$i]="$(echo "$LOL_org" | sed -n "${L},$(($LN-1))p;${LN}q" )"
|
||||
L=$LN
|
||||
|
||||
i=$(($i+1))
|
||||
done
|
||||
#~ echo "${LOL[14]}"
|
||||
#~ echo STOP
|
||||
#~ read
|
||||
|
||||
|
||||
else
|
||||
for i in $(seq 1 $FLOOTFORKS)
|
||||
do
|
||||
if [ -z "$ALPHACOLOR" ]
|
||||
|
@ -361,8 +331,6 @@ loadLOL() {
|
|||
LOL[$i]="$(echo "$LOL_org" | grep -v $ALPHACOLOR | shuf)"
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
@ -442,8 +410,6 @@ floot() {
|
|||
esac
|
||||
|
||||
message "starting $FLOOTFORKS workers"
|
||||
|
||||
|
||||
while true
|
||||
do
|
||||
for i in $(seq $FLOOTFORKS)
|
||||
|
@ -454,20 +420,13 @@ floot() {
|
|||
message "worker ${YELLOW}$i${ENDCOLOR} is not running, starting it"
|
||||
#if [ "$FLOOTSRUNNING" -le "$FLOOTFORKS" ]
|
||||
#then
|
||||
if [ $LARGE ]
|
||||
then
|
||||
flootworker $LOLFIELDS &
|
||||
LOLPID[$i]=$!
|
||||
else
|
||||
flootworker $i &
|
||||
LOLPID[$i]=$!
|
||||
fi
|
||||
flootworker $i &
|
||||
LOLPID[$i]=$!
|
||||
#fi
|
||||
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
@ -552,7 +511,7 @@ case $1 in
|
|||
echo "IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)"
|
||||
echo "SIZE(int), TEXT(string), FONTSIZE(int), BGCOLOR(hex), COLOR(hex)"
|
||||
echo "BORDERCOLOR(hex), X(int), Y(int), X_MAX(int), Y_MAX(int), H(int), W(int)"
|
||||
echo "RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int), LARGE(bool)"
|
||||
echo "RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int)"
|
||||
|
||||
exit 1
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue