|
|
|
@ -2,15 +2,25 @@
|
|
|
|
##
|
|
|
|
##
|
|
|
|
## ./script ${RESOLUTION} ${VERSION_CODENAME} ${STATE_MODE}
|
|
|
|
## ./script ${RESOLUTION} ${VERSION_CODENAME} ${STATE_MODE}
|
|
|
|
## RESOLUTION:
|
|
|
|
## RESOLUTION:
|
|
|
|
## 1024x768 #(4:3)
|
|
|
|
## 1024x768 #1.33 (4:3)
|
|
|
|
## 2048x1536 #(4:3)
|
|
|
|
## 2048x1536 #1.33 (4:3)
|
|
|
|
## 1440x1080 #(4:3)
|
|
|
|
## 1440x1080 #1.33 (4:3)
|
|
|
|
## 2560x2048 #(5:4)
|
|
|
|
## 2560x2048 #1.25 (5:4)
|
|
|
|
## 1920x1080 #(16:9)
|
|
|
|
## 1920x1080 #1.77 (16:9)
|
|
|
|
## 3840x2160 #(16:9)
|
|
|
|
## 3840x2160 #1.77 (16:9)
|
|
|
|
## 3440x1440 #(21:9)
|
|
|
|
## 3440x1440 #2.38 (21:9)
|
|
|
|
## 1440x900 #(16:10)
|
|
|
|
## 1440x900 #1.60 (16:10)
|
|
|
|
## 2560x1600 #(16:10)
|
|
|
|
## 2560x1600 #1.60 (16:10)
|
|
|
|
|
|
|
|
## 2560x1440 #1.77 (19:10) 2K QHD 1440p
|
|
|
|
|
|
|
|
## 3840x2160 #1.77 (16:9) 4K UHD 2160p
|
|
|
|
|
|
|
|
## 3840x1600 #2.40 (12:5) 4K UHD 1600p
|
|
|
|
|
|
|
|
## 4096x2160 #1.89 (256:135) 4K UHD 2160p
|
|
|
|
|
|
|
|
## 4096x1416 #2.89 (1024:429) 4K UHD 1416p
|
|
|
|
|
|
|
|
## 3996x2160 #1.85 (999:540) 4K UHD 2160p
|
|
|
|
|
|
|
|
## 5120x2160 #2.37 (:) 5K UHD 2160p
|
|
|
|
|
|
|
|
## 7680x4320 #1.77(16:9 17:9 21:9) 8K UHD 4320p
|
|
|
|
|
|
|
|
## 10240x4320 #2.37 (21:9) 10K 4320p
|
|
|
|
|
|
|
|
|
|
|
|
## VERSION_CODENAME:
|
|
|
|
## VERSION_CODENAME:
|
|
|
|
## ublinux_db
|
|
|
|
## ublinux_db
|
|
|
|
## ublinux_de
|
|
|
|
## ublinux_de
|
|
|
|
@ -266,7 +276,6 @@ insert_background_icon(){
|
|
|
|
# echo "${RESOLUTION}"
|
|
|
|
# echo "${RESOLUTION}"
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p ${wallpapers_tmp}
|
|
|
|
mkdir -p ${wallpapers_tmp}
|
|
|
|
|
|
|
|
|
|
|
|
# [[ -L ${wallpapers_dst} ]] || mkdir -p ${wallpapers_dst}
|
|
|
|
# [[ -L ${wallpapers_dst} ]] || mkdir -p ${wallpapers_dst}
|
|
|
|
if [[ ! -e ${wallpapers_dst} ]]; then
|
|
|
|
if [[ ! -e ${wallpapers_dst} ]]; then
|
|
|
|
mkdir -p $(readlink ${wallpapers_dst}) || mkdir -p ${wallpapers_dst}
|
|
|
|
mkdir -p $(readlink ${wallpapers_dst}) || mkdir -p ${wallpapers_dst}
|
|
|
|
@ -278,6 +287,7 @@ insert_background_icon(){
|
|
|
|
[[ -z $1 ]] || RESOLUTION=$1
|
|
|
|
[[ -z $1 ]] || RESOLUTION=$1
|
|
|
|
[[ -z "${RESOLUTION}" ]] && get_max_resolution
|
|
|
|
[[ -z "${RESOLUTION}" ]] && get_max_resolution
|
|
|
|
[[ -z "${RESOLUTION}" ]] && echo "ERROR: resolution not detect" && exit 1
|
|
|
|
[[ -z "${RESOLUTION}" ]] && echo "ERROR: resolution not detect" && exit 1
|
|
|
|
|
|
|
|
|
|
|
|
# Определение редакции ОС
|
|
|
|
# Определение редакции ОС
|
|
|
|
[[ -z $2 ]] && edition_os=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d"=" -f2 2>/dev/null) || edition_os=$2
|
|
|
|
[[ -z $2 ]] && edition_os=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d"=" -f2 2>/dev/null) || edition_os=$2
|
|
|
|
|
|
|
|
|
|
|
|
@ -297,27 +307,37 @@ insert_background_icon(){
|
|
|
|
fname_ratio="16:10"
|
|
|
|
fname_ratio="16:10"
|
|
|
|
elif [ $(bc -l <<< "${ratio}==2.38") -eq 1 ]; then
|
|
|
|
elif [ $(bc -l <<< "${ratio}==2.38") -eq 1 ]; then
|
|
|
|
fname_ratio="21:9"
|
|
|
|
fname_ratio="21:9"
|
|
|
|
|
|
|
|
elif [ $(bc -l <<< "${ratio}==2.37") -eq 1 ]; then
|
|
|
|
|
|
|
|
fname_ratio="21:9"
|
|
|
|
|
|
|
|
elif [ $(bc -l <<< "${ratio}==2.40") -eq 1 ]; then
|
|
|
|
|
|
|
|
fname_ratio="12:5"
|
|
|
|
|
|
|
|
elif [ $(bc -l <<< "${ratio}==1.89") -eq 1 ]; then
|
|
|
|
|
|
|
|
fname_ratio="256:135"
|
|
|
|
|
|
|
|
elif [ $(bc -l <<< "${ratio}==2.89") -eq 1 ]; then
|
|
|
|
|
|
|
|
fname_ratio="1024:429"
|
|
|
|
|
|
|
|
elif [ $(bc -l <<< "${ratio}==1.85") -eq 1 ]; then
|
|
|
|
|
|
|
|
fname_ratio="999:540"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fname_ratio="unknown"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#echo "==> ${width}x${hight} :: ${ratio} :: $fname_ratio" && exit 1
|
|
|
|
#echo "==> ${width}x${hight} :: ${ratio} :: ${fname_ratio}" && exit 1
|
|
|
|
|
|
|
|
|
|
|
|
# Установка значений переменных для графических ресурсов, исходя из типа редакции ОС
|
|
|
|
# Установка значений переменных для графических ресурсов, исходя из типа редакции ОС
|
|
|
|
geometry_logo_wp=+69-52
|
|
|
|
geometry_logo_wp=+69-52
|
|
|
|
case "${edition_os}" in
|
|
|
|
case "${edition_os}" in
|
|
|
|
ublinux_db)
|
|
|
|
ublinux_db)
|
|
|
|
background=${source_img_dir}/$bg_desktop_basic
|
|
|
|
background=${source_img_dir}/$bg_desktop_basic
|
|
|
|
edition_img=${logo_desktop_basic}
|
|
|
|
edition_img=${logo_desktop_basic}
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
ublinux_de)
|
|
|
|
ublinux_de)
|
|
|
|
background=${source_img_dir}/$bg_desktop_enterprise
|
|
|
|
background=${source_img_dir}/$bg_desktop_enterprise
|
|
|
|
edition_img=${logo_desktop_enterprise}
|
|
|
|
edition_img=${logo_desktop_enterprise}
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
ublinux_edu)
|
|
|
|
ublinux_edu)
|
|
|
|
background=${source_img_dir}/$bg_education
|
|
|
|
background=${source_img_dir}/$bg_education
|
|
|
|
edition_img=${logo_education}
|
|
|
|
edition_img=${logo_education}
|
|
|
|
geometry_edition_wp=+70+256
|
|
|
|
geometry_edition_wp=+70+256
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
@ -332,9 +352,9 @@ insert_background_icon(){
|
|
|
|
geometry_edition_wp=+72+256
|
|
|
|
geometry_edition_wp=+72+256
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
ublinux_de_adara)
|
|
|
|
ublinux_de_adara)
|
|
|
|
background=${source_img_dir}/$bg_desktop_enterprise
|
|
|
|
background=${source_img_dir}/$bg_desktop_enterprise
|
|
|
|
edition_img=${logo_desktop_enterprise}
|
|
|
|
edition_img=${logo_desktop_enterprise}
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
geometry_adara_wp=+130+42
|
|
|
|
geometry_adara_wp=+130+42
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
ublinux_srv_adara)
|
|
|
|
ublinux_srv_adara)
|
|
|
|
@ -344,13 +364,13 @@ insert_background_icon(){
|
|
|
|
geometry_adara_wp=+130+42
|
|
|
|
geometry_adara_wp=+130+42
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
ublinux_de_sibsutis)
|
|
|
|
ublinux_de_sibsutis)
|
|
|
|
background=${source_img_dir}/$bg_desktop_enterprise
|
|
|
|
background=${source_img_dir}/$bg_desktop_enterprise
|
|
|
|
edition_img=${logo_desktop_enterprise}
|
|
|
|
edition_img=${logo_desktop_enterprise}
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
geometry_sibsutis_wp=+470+166
|
|
|
|
geometry_sibsutis_wp=+470+166
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
ublinux_edu_sibsutis)
|
|
|
|
ublinux_edu_sibsutis)
|
|
|
|
background=${source_img_dir}/$bg_education
|
|
|
|
background=${source_img_dir}/$bg_education
|
|
|
|
edition_img=${logo_education}
|
|
|
|
edition_img=${logo_education}
|
|
|
|
geometry_edition_wp=+70+256
|
|
|
|
geometry_edition_wp=+70+256
|
|
|
|
geometry_sibsutis_wp=+470+166
|
|
|
|
geometry_sibsutis_wp=+470+166
|
|
|
|
@ -368,7 +388,7 @@ insert_background_icon(){
|
|
|
|
unset logo_light
|
|
|
|
unset logo_light
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
ublinux_unknown | *)
|
|
|
|
ublinux_unknown | *)
|
|
|
|
background=${source_img_dir}/$bg_desktop_basic
|
|
|
|
background=${source_img_dir}/$bg_desktop_basic
|
|
|
|
edition_img=${logo_desktop_basic}
|
|
|
|
edition_img=${logo_desktop_basic}
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
geometry_edition_wp=+86+256
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
@ -401,6 +421,11 @@ insert_background_icon(){
|
|
|
|
convert -resize x${hight} ${wallpapers_tmp}/${filename} ${wallpapers_tmp}/${filename}
|
|
|
|
convert -resize x${hight} ${wallpapers_tmp}/${filename} ${wallpapers_tmp}/${filename}
|
|
|
|
done
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
*) # Изменить размер пропорционально
|
|
|
|
|
|
|
|
for filename in ${wp_de_filename} ${wp_dm_filename}; do
|
|
|
|
|
|
|
|
convert -resize x${hight} ${wallpapers_tmp}/${filename} ${wallpapers_tmp}/${filename}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
build_background_dm
|
|
|
|
build_background_dm
|
|
|
|
[[ -z ${BUILD_MANUAL} ]] && mv ${wallpapers_tmp}/${wp_de_filename} ${wallpapers_dst}/${edition_os}_background_${fname_ratio}_${RESOLUTION}.jpg || mv ${wallpapers_tmp}/${wp_de_filename} ${wallpapers_tmp}/${edition_os}_background_${fname_ratio}_${RESOLUTION}.jpg
|
|
|
|
[[ -z ${BUILD_MANUAL} ]] && mv ${wallpapers_tmp}/${wp_de_filename} ${wallpapers_dst}/${edition_os}_background_${fname_ratio}_${RESOLUTION}.jpg || mv ${wallpapers_tmp}/${wp_de_filename} ${wallpapers_tmp}/${edition_os}_background_${fname_ratio}_${RESOLUTION}.jpg
|
|
|
|
|