Skip to content

Commit

Permalink
added code
Browse files Browse the repository at this point in the history
  • Loading branch information
SpamixOfficial authored Aug 11, 2022
1 parent e937f86 commit bcfbde7
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Popcat_code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/sh

sleep 1

chromium-browser &

sleep 2

xdotool search --class chromium-browser windowactivate

sleep 6

xdotool key ctrl+l

sleep 1

xdotool type "popcat.click"

sleep 1

xdotool key Return

sleep 3

xdotool mousemove 960 540

sleep 3

while true
do
xdotool mousemove 960 540
sleep 0.5
xdotool click --repeat 400 --delay 10 1
sleep 3
done

5 changes: 5 additions & 0 deletions botcat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

sh ./Popcat_code.sh &

bash ./temperature_lock.sh &
54 changes: 54 additions & 0 deletions temperature_lock.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

raw="$(vcgencmd measure_temp | sed -E 's/.*=([0-9.]*).*/\1/')"
temperature_cpu=$(echo "$raw" | bc -l)

#when I tested
testnr=10
test=$(bc -l <<<"${temperature_cpu}+${testnr}")


overheat=80
dangerous=83
normal=55

shutdown=false
start_over=false

until false
do

if (( $(echo "$temperature_cpu > $dangerous" |bc -l) ));
then
sudo poweroff
shutdown=true
fi

if (( $(echo "$temperature_cpu > $overheat" |bc -l) ));
then
ps -aux | grep Popcat_code.sh
killall Popcat_code.sh

until (( $(echo "$temperature_cpu < $normal" |bc -l) ));
do

if (( $(echo "$temperature_cpu > $dangerous" |bc -l) ));
then
sudo poweroff
shutdown=true

fi
start_over=true
done

if [ $start_over = true ]
then
./Popcat_code.sh
fi
start_over=false

fi
sleep 0.1
done


0 comments on commit bcfbde7

Please sign in to comment.