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

When using -b (background) the image should fill the screen #2

Closed
bhepple opened this issue May 19, 2022 · 6 comments
Closed

When using -b (background) the image should fill the screen #2

bhepple opened this issue May 19, 2022 · 6 comments

Comments

@bhepple
Copy link

bhepple commented May 19, 2022

So I'll be the second issue too!

I tried using the -b background option with an image smaller than my display and it put the image in the top left corner, leaving the rest of the screen exposed.

It would be nice if it added black bars to fill in the screen or shrunk the image if it were larger than the display - like 'imv -f' - see image
dump

EDIT: I figured out how to do a screendump of the locked screen:
dump

@jovanlanik
Copy link
Owner

Thank you for reporting this! I think I'll remove the background option completely...

If you want to set a background you can use css:

window {
   background-image: url("image.png");
   background-size: contain;
   background-repeat: no-repeat;
   background-position: center;
   background-color: black;
}

@bhepple
Copy link
Author

bhepple commented May 19, 2022

This works fine, thanks!

I would suggest that this be documented in the README as I, for one, would have no idea how to put together such a CSS file.

@jovanlanik
Copy link
Owner

Yeah, I'll work on improving the documentation. Thank you for your feedback!

@bhepple
Copy link
Author

bhepple commented May 22, 2022

FWIW - I'm getting much more pleasing results with:

   background-size: cover;

I'm really happy with gtklock ATM - particularly as swaylock is giving me grief lately (it always fails the first logon attempt) - so it has become my default!!!

Thank you!! :-)

@jovanlanik
Copy link
Owner

Oh, I assumed you wanted the black bars, like in your first image! I'm glad gtklock is useful to you.

@bhepple
Copy link
Author

bhepple commented May 23, 2022

Black bars are better than exposing the desktop underneath - but stretching the image to fit is best of all.

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

No branches or pull requests

2 participants