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

Slock not showing colors when enter wrong password or caps lock is on. #2

Open
apoorv569 opened this issue May 30, 2021 · 3 comments
Open

Comments

@apoorv569
Copy link

I enabled the ALPHA_PATCH, BLUR_PIXELATED_SCREEN_PATCH, CAPSCOLOR_PATCH, KEYPRESS_FEEDBACK_PATCH, MEDIAKEYS_PATCH and MESSAGE_PATCH, but I don't see any change in color when I type wrong password and press enter, or if I turn on caps lock. Also there is no message shown either. The display just blurs with whatever was on the screen the time of locking, and I can type my password to unlock it and a random white colored bars appears on top as I type.

@bakkeby
Copy link
Owner

bakkeby commented May 30, 2021

Perhaps worth managing one's expectations when it comes to slock patches, they are not as polished as one might expect and compatibility is so and so.

random white colored bars appears on top as I type

Yes that is the behaviour of the KEYPRESS_FEEDBACK_PATCH patch that you enabled. I don't know how practical that is and to be honest I also thought it was a bug the first time I tried that patch.

there is no message shown

This will typically be if you are using an invalid font. The default "6x10" font does not exist for me for example. You can run slock -f to get a list of fonts.

Try running slock from the command line, it should show you a warning if the font is bad (after you have unlocked your screen), e.g.

$ slock
slock: Unable to load font "6x10"
slock: Try listing fonts with 'slock -f'

I haven't found a way to change the font size - it seems the patch derives it from the size of the monitor / screen area.

The message patch is also not designed with multi-monitor in mind (unless you have evenly sized and positioned monitors), so the text may not be properly centered if you have monitors of different sizes.

I don't see any change in color when I type wrong password and press enter, or if I turn on caps lock

That is, believe it or not, to be expected. All the color changes you refer to is related to the background changing color, but the BLUR_PIXELATED_SCREEN_PATCH feature replaces basic background colors with a blurred screenshot so all you see is that image.

I enabled the ALPHA_PATCH and BLUR_PIXELATED_SCREEN_PATCH

It doesn't make much sense combining these, either you want transparency or you want a blurred pixelated image shown.

I would highly recommend letting a compositor such as picom handle the blur rather than relying on BLUR_PIXELATED_SCREEN_PATCH to do the job. slock works really well with the dual kawase blur and an alpha value of 0.5.

On top of that you get all of the color changes when typing, enabling caps lock or entering the wrong password.

@apoorv569
Copy link
Author

apoorv569 commented May 30, 2021

Perhaps worth managing one's expectations when it comes to slock patches, they are not as polished as one might expect and compatibility is so and so.

random white colored bars appears on top as I type

Yes that is the behaviour of the KEYPRESS_FEEDBACK_PATCH patch that you enabled. I don't know how practical that is and to be honest I also thought it was a bug the first time I tried that patch.

there is no message shown

This will typically be if you are using an invalid font. The default "6x10" font does not exist for me for example. You can run slock -f to get a list of fonts.

Try running slock from the command line, it should show you a warning if the font is bad (after you have unlocked your screen), e.g.

$ slock
slock: Unable to load font "6x10"
slock: Try listing fonts with 'slock -f'

I haven't found a way to change the font size - it seems the patch derives it from the size of the monitor / screen area.

The message patch is also not designed with multi-monitor in mind (unless you have evenly sized and positioned monitors), so the text may not be properly centered if you have monitors of different sizes.

I don't see any change in color when I type wrong password and press enter, or if I turn on caps lock

That is, believe it or not, to be expected. All the color changes you refer to is related to the background changing color, but the BLUR_PIXELATED_SCREEN_PATCH feature replaces basic background colors with a blurred screenshot so all you see is that image.

I enabled the ALPHA_PATCH and BLUR_PIXELATED_SCREEN_PATCH

It doesn't make much sense combining these, either you want transparency or you want a blurred pixelated image shown.

I would highly recommend letting a compositor such as picom handle the blur rather than relying on BLUR_PIXELATED_SCREEN_PATCH to do the job. slock works really well with the dual kawase blur and an alpha value of 0.5.

On top of that you get all of the color changes when typing, enabling caps lock or entering the wrong password.

I tried as you suggested, the font issue was as you described. I ran slock -f it gave a huge list of fonts, I chose one at random, and it worked. But for some reason the font looked low quality, as in was not sharp enough, the edges and all, was very boxy looking. I also removed the blur patch, and it now works with colors patch. About the bars that appear on top, if that was something in middle of the screen then it would make more sense I guess, like those i3 lockscreens. But yea the patches for slock don't look that polished as you said.

@plasmoduck
Copy link

plasmoduck commented Sep 12, 2021

slock doesn't use libxft freetype2 fonts thats why the fonts look like crap, there is a patch that adds xft support and also draws a dwm logo over the blured background.

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

3 participants