Skip to content

Feature Request | Support for svgs #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thomascft opened this issue Nov 4, 2022 · 8 comments
Open

Feature Request | Support for svgs #48

thomascft opened this issue Nov 4, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@thomascft
Copy link

No description provided.

@LGFae
Copy link
Owner

LGFae commented Nov 4, 2022

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.

@LGFae LGFae added the enhancement New feature or request label Nov 28, 2022
@LGFae
Copy link
Owner

LGFae commented Dec 1, 2022

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.

@EdJoPaTo
Copy link

EdJoPaTo commented Mar 8, 2023

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.

@tralph3
Copy link

tralph3 commented Apr 20, 2023

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.

@Stetsed
Copy link

Stetsed commented Jun 2, 2023

I don't want to clog up this channel but I too would love to see SVG support.

@LGFae
Copy link
Owner

LGFae commented Jun 30, 2023

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.

@N0tAI
Copy link

N0tAI commented Jul 24, 2023

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)

@loserMcloser
Copy link

Gnome also delivers their wallpapers as SVG or WebP.

Gnome now delivers their wallpapers in SVG and JXL formats; it would be nice if swww supported both... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants