You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/profiles/templates/3.6/2_ac_install_merge/media-gfx/splash-themes-calculate/14/calculate_shutdown/template.sh

41 lines
913 B

# Calculate append=skip
for fn in *.cfg;
do
resol=${fn%.cfg}
width=$( echo $resol | cut -dx -f1 )
height=$( echo $resol | cut -dx -f2 )
orig_height=1080
k="$((1000 - ( 1000 - ${height}000 / ${orig_height} ) / 25 )) / 1000"
boxtop=$(( $height - 2 ))
text_x=$(( $width / 2 ))
text_y=$(( $height / 2 - 90 * $k ))
text_size=$(( 28 * $k ))
cat >$fn <<EOF
# Calculate comment=#
# background image
silentpic=images/silent-${resol}.jpg
# Coords of system messages
text_x=${text_x}
text_y=${text_y}
text_align middle middle
# system messages font size
text_size=${text_size}
# System messages color in format [0x|#]rrggbb, or [0x|#]rrggbbaa
text_color=0xffffff
# Path to TTF font, for system messages. Path may be:
text_font=DroidSans.ttf
#progress bar for silent mode
box silent inter 0 ${boxtop} 0 ${height} #9aedf3
box silent 0 ${boxtop} ${width} ${height} #9aedf3
EOF
done