summaryrefslogtreecommitdiffstats
path: root/mga-bg-res/mga-bg-res.xinit
diff options
context:
space:
mode:
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