diff options
Diffstat (limited to 'mga-bg-res/mga-bg-res.sh')
-rwxr-xr-x | mga-bg-res/mga-bg-res.sh | 8 |
1 files changed, 5 insertions, 3 deletions
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 |