Skip to content
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

Feature request: allow gradient background #80

Closed
juanitotc opened this issue Nov 18, 2024 · 2 comments
Closed

Feature request: allow gradient background #80

juanitotc opened this issue Nov 18, 2024 · 2 comments

Comments

@juanitotc
Copy link

Is it possible to add the ability to specify a gradient backgound in a similar fashion to this:

hsetroot -add "#0E5CA8" -add "#87C6C9" -gradient 0

@emersion
Copy link
Member

No, this is not supported, and I don't think we'd want to add the complexity. Alternatively:

  • You can use an SVG file.
  • You can ask for this feature on one of the swaybg alternatives.

@mstoeckl
Copy link
Collaborator

You can use an SVG file.

I recommend this option. Gradients can be made with a very simple SVG file, although (due to #60) you need to explicitly set width/height to the screen dimensions. In the following example, if you had a 1600x1200 display, you'd need to replace width="100%" height="100%" with width="1600" height="1200",

<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="gradient" gradientTransform="rotate(45)">
<stop offset="0%" stop-color="#0E5CA8" />
<stop offset="100%" stop-color="#87C6C9" />
</linearGradient>
</defs>
<rect width="100%" height="100%" fill="url('#gradient')"/>
</svg>

@mstoeckl mstoeckl closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants