From 528296626cde7d2e8f163acf755da244b771f9c7 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 5 Jan 2016 18:50:06 +1100 Subject: [PATCH] Fix wallpaper on Windows --- fetch.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/fetch.sh b/fetch.sh index dc662a7e..d527dee4 100755 --- a/fetch.sh +++ b/fetch.sh @@ -621,16 +621,18 @@ getwallpaper () { img=${img%*\'} ;; - "Windows XP") - img="C:/Documents\ and\ Settings/${USER}/Local\ Settings/Application\ Data/Microsoft/Wallpaper1.bmp" - ;; + "Windows") + case "$distro" in + "Windows XP") + cd c: || wall="off" + img="Documents\ and\ Settings/${USER}/Local\ Settings/Application\ Data/Microsoft/Wallpaper1.bmp" + cd - >/dev/null + ;; - "Windows 7"|"Windows 8"|"Windows 8.1"|"Windows 10") - img="%AppData%/Microsoft/Windows/Themes/TranscodedWallpaper.jpg" - ;; - - *) - wall="off" + "Windows"*) + img="%AppData%/Microsoft/Windows/Themes/TranscodedWallpaper.jpg" + ;; + esac ;; esac }