Fixed wallpapers with spaces in name not working, Fixed Fedora distro detection

This commit is contained in:
Dylan 2016-01-08 12:59:33 +11:00
parent 3593445279
commit d392373102
1 changed files with 6 additions and 5 deletions

11
fetch
View File

@ -238,7 +238,8 @@ case "$os" in
distro="CRUX" distro="CRUX"
else else
distro="$(grep -h '^NAME=' /etc/*ease)" distro="$(grep -h '^NAME=' /etc/*ease)"
distro=${distro#NAME\=\"*} distro=${distro#NAME\=*}
distro=${distro#\"*}
distro=${distro%*\"} distro=${distro%*\"}
fi fi
;; ;;
@ -599,7 +600,9 @@ getvisualstyle () {
;; ;;
"Windows"*) "Windows"*)
visualstyle="$(head -n1 /proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Themes/CurrentTheme)" path="/proc/registry/HKEY_CURRENT_USER/Software/Microsoft"
path+="/Windows/CurrentVersion/Themes/CurrentTheme"
visualstyle="$(head -n1 $path)"
visualstyle="${visualstyle##*\\}" visualstyle="${visualstyle##*\\}"
visualstyle="${visualstyle%.*}" visualstyle="${visualstyle%.*}"
visualstyle="${visualstyle^}" visualstyle="${visualstyle^}"
@ -621,9 +624,7 @@ getvisualstyle () {
getwallpaper () { getwallpaper () {
case "$os" in case "$os" in
"Linux") "Linux")
img=$(awk '/feh/ {printf $3}' "$HOME/.fehbg") img="$(awk -F\' '/feh/ {printf $2}' $HOME/.fehbg)"
img=${img#\'*}
img=${img%*\'}
;; ;;
"Windows") "Windows")