summaryrefslogtreecommitdiffstats
path: root/mga-bg-res
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2015-04-22 19:02:17 +0300
committerJani Välimaa <wally@mageia.org>2015-04-22 19:02:17 +0300
commit3e6f62173f00b6f60050c07485948bfbbb4b59ba (patch)
tree86687c46a6bc770c7700a09e55ad3137c7f7f1c5 /mga-bg-res
parentd0837a2547238412eee74646d89d8bfac4a59c6d (diff)
downloadtheme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.tar
theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.tar.gz
theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.tar.bz2
theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.tar.xz
theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.zip
mga-bg-res 0.6
Diffstat (limited to 'mga-bg-res')
-rw-r--r--mga-bg-res/NEWS3
-rw-r--r--mga-bg-res/VERSION2
-rwxr-xr-xmga-bg-res/mga-bg-res.xinit4
3 files changed, 6 insertions, 3 deletions
diff --git a/mga-bg-res/NEWS b/mga-bg-res/NEWS
index ae9e665..0211c74 100644
--- a/mga-bg-res/NEWS
+++ b/mga-bg-res/NEWS
@@ -1,3 +1,6 @@
+Version 0.6 (2015-04-22):
+- xinit script: Work also when default.jpg symlink is missing
+
Version 0.5 (2015-03-05):
- xinit script: Adapt list of available resolutions to the new set.
diff --git a/mga-bg-res/VERSION b/mga-bg-res/VERSION
index 2eb3c4f..5a2a580 100644
--- a/mga-bg-res/VERSION
+++ b/mga-bg-res/VERSION
@@ -1 +1 @@
-0.5
+0.6
diff --git a/mga-bg-res/mga-bg-res.xinit b/mga-bg-res/mga-bg-res.xinit
index 89aa97a..42d79da 100755
--- a/mga-bg-res/mga-bg-res.xinit
+++ b/mga-bg-res/mga-bg-res.xinit
@@ -4,7 +4,7 @@
res=$( xrandr | awk '/\sconnected/{i=split(substr($0,0,index($0,"+")-1),a);if($0~/\sprimary\s/){if(p==""){p=a[i]}}else{if(d==""){d=a[i]}}}END{if(p==""){print d}else{print p}}' )
bgpath="/usr/share/mga/backgrounds"
-if [ $(readlink "$bgpath/default.jpg") != "$bgpath/Mageia-Default-$res.jpg" ]; then
+if [ "$(readlink $bgpath/default.jpg)" != "$bgpath/Mageia-Default-$res.jpg" ]; then
# Check if this is a supported resolution, if not, find the background with the same aspect ratio
if [ ! -e "$bgpath/Mageia-Default-$res.jpg" ]; then
width=$(echo $res | cut -f1 -d"x")
@@ -30,7 +30,7 @@ if [ $(readlink "$bgpath/default.jpg") != "$bgpath/Mageia-Default-$res.jpg" ]; t
fi
fi
- if [ $(readlink "$bgpath/default.jpg") != "$bgpath/Mageia-Default-$res.jpg" ]; then
+ if [ "$(readlink $bgpath/default.jpg)" != "$bgpath/Mageia-Default-$res.jpg" ]; then
echo "mga-bg-res: Changing the background symlink to point to Mageia-Default-$res.jpg (aspect ratio ${ratio:0:1}.${ratio:1:3})"
/usr/bin/mga-bg-res $res
else