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)
|
IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)
|
||||||
SIZE(int), TEXT(string), FONTSIZE(int), BGCOLOR(hex), COLOR(hex)
|
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)
|
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,
|
Running on my Ryzen 4700G with [wellenbrecher](https://github.com/bits0rcerer/wellenbrecher) 1280x720 and three workers,
|
||||||
|
|
|
@ -294,19 +294,17 @@ flootworker()
|
||||||
{
|
{
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if [ $LARGE ]
|
#FLOOTSRUNNING=$((FLOOTSRUNNING+1))
|
||||||
then
|
#test $FLOOTSRUNNING -le $FLOOTFORKS &&
|
||||||
xymode
|
|
||||||
echo "$OFFSET"
|
xymode
|
||||||
for i in $(seq 0 $1 | shuf)
|
echo "$OFFSET
|
||||||
do
|
${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"
|
||||||
echo "${LOL[$i]}"
|
#FLOOTSRUNNING=$((FLOOTSRUNNING-1))
|
||||||
done
|
#echo "${LOL[$i]}" > /dev/tcp/127.0.0.1/1337 &
|
||||||
else
|
|
||||||
xymode
|
#echo "worker $i PID ${LOLPID[$i]}"
|
||||||
echo "$OFFSET
|
|
||||||
${LOL[$1]}"
|
|
||||||
fi
|
|
||||||
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"
|
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() {
|
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)
|
for i in $(seq 1 $FLOOTFORKS)
|
||||||
do
|
do
|
||||||
if [ -z "$ALPHACOLOR" ]
|
if [ -z "$ALPHACOLOR" ]
|
||||||
|
@ -362,8 +332,6 @@ loadLOL() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
floot() {
|
floot() {
|
||||||
|
@ -442,8 +410,6 @@ floot() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
message "starting $FLOOTFORKS workers"
|
message "starting $FLOOTFORKS workers"
|
||||||
|
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
for i in $(seq $FLOOTFORKS)
|
for i in $(seq $FLOOTFORKS)
|
||||||
|
@ -454,20 +420,13 @@ floot() {
|
||||||
message "worker ${YELLOW}$i${ENDCOLOR} is not running, starting it"
|
message "worker ${YELLOW}$i${ENDCOLOR} is not running, starting it"
|
||||||
#if [ "$FLOOTSRUNNING" -le "$FLOOTFORKS" ]
|
#if [ "$FLOOTSRUNNING" -le "$FLOOTFORKS" ]
|
||||||
#then
|
#then
|
||||||
if [ $LARGE ]
|
flootworker $i &
|
||||||
then
|
LOLPID[$i]=$!
|
||||||
flootworker $LOLFIELDS &
|
|
||||||
LOLPID[$i]=$!
|
|
||||||
else
|
|
||||||
flootworker $i &
|
|
||||||
LOLPID[$i]=$!
|
|
||||||
fi
|
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
@ -552,7 +511,7 @@ case $1 in
|
||||||
echo "IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)"
|
echo "IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)"
|
||||||
echo "SIZE(int), TEXT(string), FONTSIZE(int), BGCOLOR(hex), COLOR(hex)"
|
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 "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
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue