Added support for Windows wallpapers
This commit is contained in:
parent
c09d2aecb0
commit
6d77ae4123
1 changed files with 19 additions and 6 deletions
25
fetch.sh
25
fetch.sh
|
@ -586,7 +586,6 @@ getresolution () {
|
||||||
resolution="Unknown"
|
resolution="Unknown"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getcols () {
|
getcols () {
|
||||||
|
@ -613,6 +612,24 @@ getcols () {
|
||||||
# Images {{{
|
# Images {{{
|
||||||
|
|
||||||
|
|
||||||
|
getwallpaper () {
|
||||||
|
case "$os" in
|
||||||
|
"Linux")
|
||||||
|
img=$(awk '/feh/ {printf $3}' "$HOME/.fehbg")
|
||||||
|
img=${img#\'*}
|
||||||
|
img=${img%*\'}
|
||||||
|
;;
|
||||||
|
|
||||||
|
"Windows"*)
|
||||||
|
img="%AppData%/Microsoft/Windows/Themes/TranscodedWallpaper.jpg"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
wall="off"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
getimage () {
|
getimage () {
|
||||||
# Check if the directory exists
|
# Check if the directory exists
|
||||||
[ ! -d "$imgtempdir" ] && (mkdir "$imgtempdir" || exit)
|
[ ! -d "$imgtempdir" ] && (mkdir "$imgtempdir" || exit)
|
||||||
|
@ -634,11 +651,7 @@ getimage () {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# If wall=on, Get image to display from current wallpaper.
|
# If wall=on, Get image to display from current wallpaper.
|
||||||
if [ "$wall" == "on" ]; then
|
[ "$wall" == "on" ] && getwallpaper
|
||||||
img=$(awk '/feh/ {printf $3}' "$HOME/.fehbg")
|
|
||||||
img=${img#\'*}
|
|
||||||
img=${img%*\'}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get name of image and prefix it with it's crop mode and offset
|
# Get name of image and prefix it with it's crop mode and offset
|
||||||
imgname="$crop_mode-$crop_offset-${img##*/}"
|
imgname="$crop_mode-$crop_offset-${img##*/}"
|
||||||
|
|
Loading…
Reference in a new issue