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
Added new background images for default theme #2867
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2867 +/- ##
==========================================
- Coverage 86.69% 86.69% -0.01%
==========================================
Files 577 577
Lines 39336 39336
==========================================
- Hits 34104 34102 -2
- Misses 5232 5234 +2
|
Hi, It is quite nice. The current default one is very ugly. Do you have the Blender file for this? Given the vibe of the dark one, I see maybe an extra scanline filter, 16:9 ratio and a muild cyberpunk/VHS code separation pass on the text. As for being the default, I am not sure how to go forward on it. With the HiDPI support eventually becoming reality, having a locally rendered wallpaper like the |
i also would push into having some lua-generated wallpaper by default for example on my current screen both current and proposed wallpapers (W: 2048px | H: 1536px ) would have upscaling artifacts |
@Elv13 or @actionless could either of you elaborate on how this generation would happen? I can see an SVG file being rendered on the fly, but surely not a Blender file... So I'm sure I'm missing something. Or would it mean shipping with massively huge rendered file, and then downscaling on the fly? And btw great idea on the scanline / ratio / vhs effects, I'll experiment with those a bit. I'll supply the Blender file once I've made those changes. |
yeah, actually from recently awesomeWM supports proper SVG scaling, so it could be an option but i was talking about: https://github.com/awesomeWM/awesome/blob/master/lib/beautiful/theme_assets.lua#L189 |
Ah so... Perhaps I need to make a PR with a lua / cairo script that will generate a pretty thing? |
so basically:
|
(my second point means what it will allow it to be used in |
I could be mistaken, but following an xresources/gtk theme color palette would prove to be quite challenging if you want control over the overall design of the wallpaper. Not impossible to do, but would have to design it quite carefully around the fact that all the colors will indeed change. |
for your wallpapers i would make such parameters:
IMHO it's not a responsibility of wallpaper-generating function but of the one who supplies those arguments to it, for example in theme itself there are constrains which sorta "pre-processing" colors before choosing which of them to use as wallpaper arguments: https://github.com/awesomeWM/awesome/blob/master/themes/xresources/theme.lua#L121-L130 https://github.com/awesomeWM/awesome/blob/master/themes/gtk/theme.lua#L333-L346 |
How about, btw, making a premade SVG, and then just using cairo to change the colours in the SVG? Could have some pre-defined classes that one adds to the SVG that you then manipulate with cairo. |
nice |
The only issue is that as far as I understand, cairo and thus Inkscape have a pretty limited color depth for gradients and blur etc, resulting in visible banding for any larger gradients. Any ideas to circumvent this limitation? I can do my design without any, but I certainly couldn't recreate anything close to my original Blender rendering in Inkscape if this is the case. Cairo seems to maybe have a way to render a higher bit depth version, but I wasn't able to find a way to do it via any of the command line tools available. Again, ideas are very welcome! As a sidenote, I believe chromium for example dithers the gradients on the fly. |
what about trying to apply blur effect instead/on top of the gradient? |
Blur has the same issue, sadly! |
i don't see it: <!DOCTYPE html>
<html>
<body>
<svg width="640" height="480" >
<defs>
<filter id="f1" x="0" y="0">
<feGaussianBlur in="SourceGraphic" stdDeviation="35" />
</filter>
<linearGradient id = "backgroundColor">
<stop stop-color = "#d8dddd" stop-opacity = "1"/>
</linearGradient>
<linearGradient id = "textColor">
<stop stop-color = "#916aa3" stop-opacity = "1"/>
</linearGradient>
<linearGradient id = "mainColor">
<stop stop-color = "#916aa3" stop-opacity = "0.3"/>
</linearGradient>
<style>
.txt { font: bold 60px "Fantasque Sans Mono"; }
</style>
</defs>
<rect x="0" y="0" width="640" height="480" fill="url(#backgroundColor)" />
<g id="mainGroup" filter="url(#f1)">
<rect x="0" y="0" width="640" height="480" fill="transparent" />
<rect x="200" y="100" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="350" y="130" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="450" y="130" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="0" y="230" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="220" y="300" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="340" y="340" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="450" y="390" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
</g>
<text x="160" y="240" class="txt" fill="url(#textColor)">awesome :3</text>
</svg>
</body>
</html> |
oh, i see it actually after zooming in :( |
Also browsers are really really good at rendering svg's. I believe they dither on the fly. Cairo on the other hand... It's good, but gradients seem to be an issue. If you find that it's not, I'm very glad to hear how you manage to avoid its banding issues! |
Oh I see that's a png, but yeah indeed, zooming reveals the issue. |
i mean i can see those steps but i am not considering them to be a blocker issue |
also just tried to combine it together with https://awesomewm.org/images/awesome-logo.svg: <!DOCTYPE html>
<html>
<body>
<svg width="640" height="480" >
<defs>
<filter id="f1" x="0" y="0">
<feGaussianBlur in="SourceGraphic" stdDeviation="35" />
</filter>
<linearGradient id = "backgroundColor">
<stop stop-color = "#0e0021" stop-opacity = "1"/>
</linearGradient>
<linearGradient id = "textColor">
<stop stop-color = "#765d6e" stop-opacity = "1"/>
</linearGradient>
<linearGradient id = "mainColor">
<stop stop-color = "#916aa3" stop-opacity = "0.3"/>
</linearGradient>
<linearGradient id = "mainColor2">
<stop stop-color = "#6a91a3" stop-opacity = "0.3"/>
</linearGradient>
<linearGradient id = "mainColor4">
<stop stop-color = "#a36a91" stop-opacity = "0.3"/>
</linearGradient>
<linearGradient id = "mainColor3">
<stop stop-color = "#91a36a" stop-opacity = "0.3"/>
</linearGradient>
<style>
.txt { font: bold 60px "Fantasque Sans Mono"; }
</style>
</defs>
<rect x="0" y="0" width="640" height="480" fill="url(#backgroundColor)" />
<g id="mainGroup" filter="url(#f1)">
<rect x="0" y="0" width="640" height="480" fill="transparent" />
<rect x="200" y="100" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="350" y="130" width="120" height="120" stroke-width="6" fill="url(#mainColor2)"/>
<rect x="450" y="130" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="550" y="150" width="120" height="120" stroke-width="6" fill="url(#mainColor3)"/>
<rect x="0" y="230" width="120" height="120" stroke-width="6" fill="url(#mainColor4)"/>
<rect x="220" y="300" width="120" height="120" stroke-width="6" fill="url(#mainColor3)"/>
<rect x="340" y="340" width="120" height="120" stroke-width="6" fill="url(#mainColor)"/>
<rect x="450" y="390" width="120" height="120" stroke-width="6" fill="url(#mainColor2)"/>
</g>
<svg id="textGroup" x="60" y="190">
<path
d="M 0,63.999999 V 22 H 43.999999 V 20 H 0 V 0 h 63.999999 v 63.999999 h -20 V 42 H 20 v 2 h 21.999999 v 19.999999 z"
id="path10"
style="fill:url(#textColor)"
inkscape:connector-curvature="0" />
<path
style="fill:url(#textColor)"
id="path5121"
d="M 75.999999,0 H 118 v 43.999999 h 2 V 0 h 20 V 63.999999 H 75.999999 c 0.03867,-19.975266 1.21505,-20 22,-20 V 0 l -2,3.13e-4 v 44.03356 l -20,19.966102 z"
inkscape:connector-curvature="0" />
<path
d="m 216,0 v 42 h -44 v 2 h 44 V 64 H 152 V 0 c 19.97527,0.03867 20,1.21505 20,22 h 44 l -3.1e-4,-2 H 171.96613 L 152.00002,0 Z"
id="path5123"
style="fill:url(#textColor)"
inkscape:connector-curvature="0" />
<path
style="fill:url(#textColor)"
id="path5125"
d="M 292,63.999999 V 22 h -44 v -2 h 44 V 0 h -64 v 42.011827 l 20,-0.01183 v 0 h 24 v 2.09375 h -44 l -0.009,19.906249 z"
inkscape:connector-curvature="0" />
<path
d="m 324.3125,63.999999 c 0,-43.882671 0.18277,-0.110242 -0.0915,-43.999999 h 0.88388 42.89515 V 0 h -64 c 0,63.768424 -0.009,0.109806 -0.009,63.999996 z"
id="path5127"
style="fill:url(#textColor)"
inkscape:connector-curvature="0" />
<path
d="m 380,63.999999 h 42 V 20.000001 h 2 v 43.999998 h 20 V 0 h -64 c 0.0387,19.975267 1.21505,20.000001 22,20.000001 v 43.999998 l -2,-3.13e-4 V 19.966127 L 380,2.4e-5 Z"
id="path5129"
style="fill:url(#textColor)"
inkscape:connector-curvature="0" />
<path
style="fill:url(#textColor)"
id="path5131"
d="m 520,0 v 42 h -44 v 2 h 44 V 64 H 456 V 0 c 19.97527,0.03867 20,1.21505 20,22 h 44 l -3.1e-4,-2 H 475.96613 L 456.00002,0 Z"
inkscape:connector-curvature="0" />
<path
style="fill:url(#textColor)"
id="path5135"
d="m 332.34911,63.999999 c 0,-44.007671 -0.003,-0.02174 -0.003,-43.999999 0,0 30.24668,0 35.65403,0 V 0 h -64 c 0,63.768424 -0.009,0.109806 -0.009,63.999996 z"
inkscape:connector-curvature="0" />
<path
d="m 334.99382,63.999999 c 0,0 -0.003,-0.02174 -0.003,-43.999999 h 32.71653 V 0 h -63.70721 c 0,63.768424 -0.009,0.109806 -0.009,63.999996 z"
id="path5137"
style="fill:url(#textColor)"
inkscape:connector-curvature="0" />
<path
style="fill:url(#textColor)"
id="path5162"
d="m 347.67867,0 c 0,43.882671 -0.18277,0.110242 0.0915,43.999999 h -0.88388 -42.89515 v 20 h 64 c 0,-63.768424 0.009,-0.109806 0.009,-63.999996 z"
inkscape:connector-curvature="0" />
<path
d="m 339.64206,0 c 0,44.007671 0.003,0.02174 0.003,43.999999 0,0 -30.24668,0 -35.65403,0 v 20 h 64 c 0,-63.768424 0.009,-0.109806 0.009,-63.999996 z"
id="path5164"
style="fill:url(#textColor)"
inkscape:connector-curvature="0" />
<path
style="fill:url(#textColor)"
id="path5166"
d="m 336.99735,0 c 0,0 0.003,0.02174 0.003,43.999999 h -32.71653 v 20 h 63.70721 c 0,-63.768424 0.009,-0.109806 0.009,-63.999996 z"
inkscape:connector-curvature="0" />
</svg>
</svg>
</body>
</html> |
and with some extra effect (which should hopefully slightly elminiate visually the gradient steps): <filter id="noise" x="0%" y="0%" width="100%" height="100%">
<feTurbulence baseFrequency="0.01 0.4" result="NOISE" numOctaves="2" />
<feDisplacementMap in="SourceGraphic" in2="NOISE" scale="8" xChannelSelector="R" yChannelSelector="R"></feDisplacementMap>
</filter> |
Nice! I wasn't sure if turbulence was safe to use, I'm not quite sure what cairo supports. But yeah that looks good, I'll make a new version based on our discussion. |
Whoa, that svg you posted shows up incredibly garbled in Inkscape. I was able to render it with rsvg however and it looks fine. ... what on earth. |
i was testing it only with rsvg and in firefox in awesomewm i think it gonna be the same result as from rendering with rsvg |
I'm sad to see Inkscape did so very badly rendering that, I wonder what's up with that? Btw as a curiosity, trying to render it with cairosvg results in an error. So seeing that Inkscape is having such a hard time with this, I guess the best way forward after is doing this by "hand" aka hand coding the svg file. I'm curious though @actionless your svg has "inkscape:connector-curvature="0"" which makes me think you made it Inkscape after all? Or where did that come from? |
|
Aaaah that explains cheers! :) |
The plot thickens... Wiki page for librsvg says that it actually uses cairo, however rendering with the cairo command line client produces a blocky version without any of the blurs and things... And Inkscape, as mentioned, also renders that very poorly. |
ah, proper svg scaling is supported only by imagebox now: https://github.com/awesomeWM/awesome/pull/2779/files but not by a wallpaper, that's why |
This is where my As a side note, watch out with all the filters in your SVG. Cairo doesn't support all of them. |
thanks a lot!
yeah, i was just experimenting which of them would work and so far the current three filters which are used seems to produce the same result in firefox and cairo |
imho it's not a big problem since awesomewm wallpaper could be aligned as
speaking of SVG filters, i think that could be also (optionally, based on some variable) addressed by them |
I worked a bit on the |
@Elv13 hi! Any progress on this? |
This comment has been minimized.
This comment has been minimized.
Hooray, after years of procrastination, the new wallpaper API is merged. #3343 This means SVG and "smarter" wallpapers are now fully supported. This PR is now unblocked. |
Beautiful work!! @actionless do you want to do the honors of finishing this with the svg you created? |
i think @Elv13 had a bit updated version, if i not mistaken, which was already using beautiful+new wallpaper api btw this wallpaper also worth adding, if adding some awesome letters on top (could be take from theme assets, as it also using cairo api) and using beautiful colors instead of hardcoded ones: |
I made these background images in Blender 2.8, as I feel the original default theme causes a bit of eye ache.