hyprlock icon indicating copy to clipboard operation
hyprlock copied to clipboard

Missing background image leaves empty lockscreen

Open DerekSauer opened this issue 1 year ago • 6 comments

I'm working on a utility that screenshots my monitors, messes up the images, and uses those for hyprlock's background images. I'm a pretty awful coder so frequently the images aren't where they should be when I test it.

If hyprlock cannot load the background image(s) specified in the config it draws nothing for the background leaving your workspaces visible for the world to see with the widgets drawn on top.

I think it should probably fallback to the background color specified in the config or the default background color if even that is missing. If a user really wants a transparent lockscreen they can specify a color with a lower alpha value.

I've written a hack around the problem and will submit a PR, this issue is just for reference.

DerekSauer avatar Feb 21 '24 15:02 DerekSauer

as hypr wiki, If path is empty or missing, will use color. Otherwise, the image will be used. so just change color to solid color.

sentakuhm avatar Feb 21 '24 16:02 sentakuhm

Yeah if the path field in the config is empty or missing it does fallback to color as indicated.

If the image specified by path does not exist on disk, it would not render a background at all.

DerekSauer avatar Feb 21 '24 16:02 DerekSauer

If the image specified by path does not exist on disk, it would not render a background at all.

yup you're right.

sentakuhm avatar Feb 21 '24 16:02 sentakuhm

So I guess you'd like a black background or smth to be rendered? I agree tbh

alba4k avatar Feb 21 '24 22:02 alba4k

As per #158 if you specify a color in background and the image could not be opened/rendered, then it will fall back to the color.

So I would consider this as fixed.

PointerDilemma avatar Mar 11 '24 13:03 PointerDilemma

Do we consider this as fixed, or is the expected resolution to always render something, even if no background widget is present?

PointerDilemma avatar Jan 01 '25 10:01 PointerDilemma