diff options
author | Jani Välimaa <wally@mageia.org> | 2015-04-22 19:02:17 +0300 |
---|---|---|
committer | Jani Välimaa <wally@mageia.org> | 2015-04-22 19:02:17 +0300 |
commit | 3e6f62173f00b6f60050c07485948bfbbb4b59ba (patch) | |
tree | 86687c46a6bc770c7700a09e55ad3137c7f7f1c5 | |
parent | d0837a2547238412eee74646d89d8bfac4a59c6d (diff) | |
download | theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.tar theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.tar.gz theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.tar.bz2 theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.tar.xz theme-3e6f62173f00b6f60050c07485948bfbbb4b59ba.zip |
mga-bg-res 0.6
-rw-r--r-- | mga-bg-res/NEWS | 3 | ||||
-rw-r--r-- | mga-bg-res/VERSION | 2 | ||||
-rwxr-xr-x | mga-bg-res/mga-bg-res.xinit | 4 |
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 |