From 8b25a57beb6c5db588c99f8656a4ac8da79b8bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 15 Aug 2016 08:21:49 +0200 Subject: Fix 16:9 reference resolution for Mageia 6 artwork (3840x2160) --- mga-bg-res/mga-bg-res.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mga-bg-res/mga-bg-res.sh') diff --git a/mga-bg-res/mga-bg-res.sh b/mga-bg-res/mga-bg-res.sh index 00f7688..0c733de 100755 --- a/mga-bg-res/mga-bg-res.sh +++ b/mga-bg-res/mga-bg-res.sh @@ -27,7 +27,7 @@ if [ ! -e "$bgpath/$theme-$res.jpg" ]; then # Bash only does integer arithmetic, we multiply everything by 1000 to workaround this ratio=$((1000*$width/$height)) declare -A refRatios=( ["1250"]="1280x1024" ["1333"]="1600x1200" ["1600"]="1920x1200" - ["1667"]="1280x768" ["1707"]="1024x600" ["1778"]="1920x1080" ) + ["1667"]="1280x768" ["1707"]="1024x600" ["1778"]="3840x2160" ) for key in "${!refRatios[@]}"; do if [ $(($ratio % $key)) -lt 25 -o $(($key % $ratio)) -lt 25 ]; then res=${refRatios[$key]} @@ -40,8 +40,10 @@ fi # If not, create a new symlink if [ "$curlink" != "$bgpath/$theme-$res.jpg" ]; then if [ -e "$bgpath/$theme-$res.jpg" ]; then - ln -sf $bgpath/$theme-$res.jpg $bgpath/default.jpg + ln -sf $bgpath/$theme-$res.jpg $bgpath/default.jpg else - echo -e "Could not find this file: $bgpath/$theme-$res.jpg.\nPlease check that the mageia-theme-Default package is properly installed, or disable the mga-bg-res systemd service if you do not want to force using the Mageia theme." + echo -e "Could not find this file: $bgpath/$theme-$res.jpg." + echo "Please check that the mageia-theme-Default package is properly installed, or disable" + echo "the mga-bg-res systemd service if you do not want to force using the Mageia theme." fi fi -- cgit v1.2.1