Feature Request | Support for svgs
Unlikely to be implemented anytime soon (if at all), as the image crate doesn't seem to have (or plan to have) support for it.
Update: if I manage to finish up #52, doing this wouldn't be so bad. We could use the resvg crate for it. I won't make any guarantees, however, since using svgs for wallpapers strikes me as very niche. If it makes things too complicated, I probably won't do it.
EDIT: also note resvg only supports very basic svg. So, no animations or events.
SVGs can be rendered pixel perfect for monitors and will always look sharp. Thats my main reason to prefer SVG wallpaper when possible/available. Gnome also delivers their wallpapers as SVG or WebP.
Just leaving a comment to say that I'd like this to be implemented too. I want to use SVGs as background images since they can be very easily modified with scripts to change their color palette, allowing me to have a set of backgrounds that match my overall colorscheme.
I don't want to clog up this channel but I too would love to see SVG support.
I was just want to say that reading these comments I have been convinced that it would be nice to have SVG support in swww for a variety of reasons.
Right now I have my hands full with the sctk 0.17 rewrite, but I think as soon as that is released, and we fix any weird bugs that might arise from it, I will probably look into this.
If this is something you guys want to have right now I wrote a small shell script to handle it for myself, it should only require librsvg and a shell.
Works on dash and doesn't do anything advanced so I'd reckon almost any sh compatible shell can run it.
#!/bin/sh
WIDTH='1920px'
HEIGHT='1080px'
OUTPUTS=''
[ -n "$2" ] && WIDTH="$2"
[ -n "$3" ] && HEIGHT="$3"
[ -n "$4" ] && OUTPUTS="$4"
[ -f "$1" ] && rsvg-convert "$1" --width $WIDTH --height $HEIGHT | swww img $([ -n "$OUTPUTS"] && echo "--outputs $OUTPUTS") -
Feel free to use it and make it your own (the first parameter is required (all others are optional) and must be a path to an svg file, the second but is the width in any rsvg-convert supported value, the third is the height, and the 4th is a comma separated list of outputs to display on)