forked from shihaam/starlink_status
customize meter scale, set new font style and color
This commit is contained in:
parent
c11d561bba
commit
50c42090d4
BIN
JoyPixels.ttf
BIN
JoyPixels.ttf
Binary file not shown.
15
bot.sh
15
bot.sh
@ -5,6 +5,7 @@ source .env
|
|||||||
download_meter=resources/download_meter.png
|
download_meter=resources/download_meter.png
|
||||||
upload_meter=resources/upload_meter.png
|
upload_meter=resources/upload_meter.png
|
||||||
needle=resources/needle.png
|
needle=resources/needle.png
|
||||||
|
font=resources/CODE_Bold.otf
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
@ -149,8 +150,8 @@ echo Weather checked
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
ookla_download_angle=$(echo "scale=2; -118 + ($ookla_download_mbps - 0) / (300 - 0) * (118 - -118)" | bc)
|
ookla_download_angle=$(echo "scale=2; -118 + ($ookla_download_mbps - 0) / ($MAX_DOWNLOAD_SPEED - 0) * (118 - -118)" | bc)
|
||||||
ookla_upload_angle=$(echo "scale=2; -118 + ($ookla_upload_mbps - 0) / (50 - 0) * (118 - -118)" | bc)
|
ookla_upload_angle=$(echo "scale=2; -118 + ($ookla_upload_mbps - 0) / ($MAX_UPLOAD_SPEED - 0) * (118 - -118)" | bc)
|
||||||
|
|
||||||
convert $download_meter \
|
convert $download_meter \
|
||||||
\( $needle -background none \
|
\( $needle -background none \
|
||||||
@ -158,8 +159,9 @@ convert $download_meter \
|
|||||||
-gravity center \
|
-gravity center \
|
||||||
-compose over \
|
-compose over \
|
||||||
-composite \
|
-composite \
|
||||||
-pointsize 65 \
|
-pointsize 41 \
|
||||||
-fill white \
|
-font $font \
|
||||||
|
-fill '#f85218' \
|
||||||
-annotate +0+-15 $ookla_download_mbps \
|
-annotate +0+-15 $ookla_download_mbps \
|
||||||
$speedtest_download_meter
|
$speedtest_download_meter
|
||||||
|
|
||||||
@ -169,8 +171,9 @@ convert $upload_meter \
|
|||||||
-gravity center \
|
-gravity center \
|
||||||
-compose over \
|
-compose over \
|
||||||
-composite \
|
-composite \
|
||||||
-pointsize 65 \
|
-pointsize 41 \
|
||||||
-fill white \
|
-font $font \
|
||||||
|
-fill '#5bb93f' \
|
||||||
-annotate +0+-15 $ookla_download_mbps \
|
-annotate +0+-15 $ookla_download_mbps \
|
||||||
$speedtest_upload_meter
|
$speedtest_upload_meter
|
||||||
|
|
||||||
|
@ -18,5 +18,9 @@ LONGITUDE="73.5092"
|
|||||||
|
|
||||||
|
|
||||||
# Change these as you see fit based on RTSP image resolution
|
# Change these as you see fit based on RTSP image resolution
|
||||||
UPLOAD_METER_LOCATION=510
|
UPLOAD_METER_LOCATION=510 # in px starting from download meter start
|
||||||
METER_SCALE=100
|
METER_SCALE=100 # in percentage
|
||||||
|
|
||||||
|
# Change meter scale in Mbps
|
||||||
|
MAX_DOWNLOAD_SPEED=300
|
||||||
|
MAX_UPLOAD_SPEED=50
|
||||||
|
BIN
resources/CODE_Bold.otf
Normal file
BIN
resources/CODE_Bold.otf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user