summaryrefslogtreecommitdiffstats
path: root/mga-bg-res
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-08-15 08:21:49 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-08-15 08:21:49 +0200
commit8b25a57beb6c5db588c99f8656a4ac8da79b8bc4 (patch)
treefee8b60382fd99c516015b636f3ce735f12d7787 /mga-bg-res
parent44023bdea06a723411adc07365a9304cf6fab2a3 (diff)
downloadtheme-8b25a57beb6c5db588c99f8656a4ac8da79b8bc4.tar
theme-8b25a57beb6c5db588c99f8656a4ac8da79b8bc4.tar.gz
theme-8b25a57beb6c5db588c99f8656a4ac8da79b8bc4.tar.bz2
theme-8b25a57beb6c5db588c99f8656a4ac8da79b8bc4.tar.xz
theme-8b25a57beb6c5db588c99f8656a4ac8da79b8bc4.zip
Fix 16:9 reference resolution for Mageia 6 artwork (3840x2160)
Diffstat (limited to 'mga-bg-res')
-rw-r--r--mga-bg-res/NEWS1
-rwxr-xr-xmga-bg-res/mga-bg-res.sh8
2 files changed, 6 insertions, 3 deletions
diff --git a/mga-bg-res/NEWS b/mga-bg-res/NEWS
index dfc7028..df1c9ff 100644
--- a/mga-bg-res/NEWS
+++ b/mga-bg-res/NEWS
@@ -1,3 +1,4 @@
+- Fix 16:9 reference resolution for Mageia 6 artwork (3840x2160)
- Use monitor-edid directly instead of monitor-probe, as the latter falls
back to monitor-probe-using-X which is broken (mga#15896)
- Make sure to default to 4:3 aspect ratio if monitor-edid fails (previous
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