summaryrefslogtreecommitdiffstats
path: root/mga-bg-res/mga-bg-res.xinit
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/mga-bg-res.xinit
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/mga-bg-res.xinit')
-rwxr-xr-xmga-bg-res/mga-bg-res.xinit4
1 files changed, 2 insertions, 2 deletions
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