mortie / swaylock-effects

Swaylock, with fancy effects
MIT License
713 stars 46 forks source link

effect-scale doesn't seem to do anything #2

Closed luispabon closed 5 years ago

luispabon commented 5 years ago

As per title. effect-scale=2 or 200 or whatever seems to have no effect, at least from config file:

ignore-empty-password
font=Ubuntu

clock
timestr=%R
datestr=%a, %e of %B

screenshots

effect-blur=30x3
effect-greyscale
effect-scale=2

indicator
indicator-radius=240
indicator-thickness=20
indicator-caps-lock

key-hl-color=880033

separator-color=00000000

inside-color=00000088
inside-clear-color=ffd20400
inside-caps-lock-color=009ddc00
inside-ver-color=d9d8d800
inside-wrong-color=ee2e2400

ring-color=231f20D9
ring-clear-color=231f20D9
ring-caps-lock-color=231f20D9
ring-ver-color=231f20D9
ring-wrong-color=231f20D9

line-color=00000000
line-clear-color=ffd204FF
line-caps-lock-color=009ddcFF
line-ver-color=d9d8d8FF
line-wrong-color=ee2e24FF

text-clear-color=ffd20400
text-caps-lock-color=009ddc00
text-ver-color=d9d8d800
text-wrong-color=ee2e2400

bs-hl-color=ee2e24FF
caps-lock-key-hl-color=ffd204FF
caps-lock-bs-hl-color=ee2e24FF
mortie commented 5 years ago

effect-scale does scale the image; if your screen is 1920x1080, effect-scale=2 should mean the background image is 3840x2160. However, the default scaling mode is fill, so that 3840x2160 image is being scaled back down to fill the screen when it gets rendered.

You can try to add scaling=center; that should make swaylock just show the center of the scaled image.

The main reason I added scaling is that --effect-scale=0.5 --effect-blur=7x5 --effect-scale=2 is way faster than blurring the entire screen, and that the lower quality isn't noticeable at 4k. A secondary reason was that --effect-scale=0.1 --effect-scale=10 has a sort of neat pixelation effect. I didn't consider that someone would want to actually zoom in, but that's obvious in retrospect. I'll add something about that to the documentation.

luispabon commented 5 years ago

Copy that, looks like I misunderstood how the feature works :+1:

mortie commented 5 years ago

I'm curious, what did you think the feature did? Does --effect-scale=2 --scaling=center do what you were trying to do, or were you trying to do something else?

I'm asking because if you were trying to do something else, there might be a cool new feature idea there which I could try to implement.

luispabon commented 5 years ago

Well, I hadn't seen --scaling on the docs so I assumed when scalingx2 the lock screen would show the image scaled 2x2 while centered. The reason I wanted to blow the image bigger was to avoid being too obvious about what was on either of my screens without resorting to massive blurring.

Side note: kudos for seamless multimonitor support btw.