-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e937f86
commit bcfbde7
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
sh ./Popcat_code.sh & | ||
|
||
bash ./temperature_lock.sh & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|