hyprwm / hyprlock

Hyprland's GPU-accelerated screen locking utility
BSD 3-Clause "New" or "Revised" License
727 stars 54 forks source link

[REQ] It would be nice to add blur for current screen! #72

Closed sentakuhm closed 7 months ago

sentakuhm commented 7 months ago

Now blur working perfectly thanks to hyprlock, it would be gr8 too if path is empty or missing returns blur to current screen.

background {
    monitor =
    #path = /home/.../...
    color = rgba(20, 20, 20, 1.0)
    blur_passes = 3 # 0 disables blurring
    blur_size = 10
    noise = 0.0117
    contrast = 0.8916
    brightness = 0.8172
    vibrancy = 0.1696
    vibrancy_darkness = 0.0
}
vaxerski commented 7 months ago

?

sentakuhm commented 7 months ago

when there is no image screenlock became transparent color if rgba(..,..,..,0.8) or take solid , or i am wrong in config?

alba4k commented 7 months ago

You need to set path = screenshot and it will take a screenshot before locking

A live blur is not possible afaik as the session behind the lockscreen isn't visible but is instead blocked off by a red screen, and that would be seen instead

sentakuhm commented 7 months ago

this is what i am asking for, i wont add path= ..., and blur current screen.

vaxerski commented 7 months ago

so you want the default for path= to be screenshot? no, because it's the color.

alba4k commented 7 months ago

well I mean, it could replace the color which would also make sense

sentakuhm commented 7 months ago

like this: screenshot-2264785839

vaxerski commented 7 months ago

yeah set path to screenshot

sentakuhm commented 7 months ago

screenshot

my bad, thank you very much!!

sentakuhm commented 7 months ago

OMG! this is very nice Screenshot_2024-02-23-14-23-47_23495

bvr-yr commented 7 months ago

but is it planned to allow blur for ARGB color? just like for layer-shell currently underlying screen is not locked when alpha < 1

vaxerski commented 7 months ago

?

bvr-yr commented 7 months ago

https://github.com/hyprwm/hyprlock/assets/130279855/e240f272-9ae2-49ce-85e4-3adb6b195a1e

vaxerski commented 7 months ago

oh, if you set color to a value with an alpha < 1 it becomes invisible?

Can I get your config?

bvr-yr commented 7 months ago

i mean if background is color and alpha < 1, there is no blur should it be in the first place? or it is intended, and only still image get blurred

there is no huge need in such thing, actually screenshot is totally ok as it saves a lot of resources on laptop (screenlock implies AFK), just curious this is bug or feature

that's one from the video

general {
    grace = 10
}

background {
    monitor = eDP-1
    color = rgba(40, 40, 40, 0.5)
    blur_passes = 3
    blur_size = 7
    noise = 0.0117
    contrast = 0.8916
    brightness = 0.6172
    vibrancy = 0.8696
    vibrancy_darkness = 0.0
}

label {
    monitor = eDP-1
    text = <b>WTF</b>
    color = 0xFFD4BE98
    font_size = 100
    font_family = FiraCode Nerd Font Med
    position = 0, 0
    halign = center
    valign = center
}

input-field {
    fade_on_empty = true
    position = 0, -200
}
bvr-yr commented 7 months ago

there is no blur

should i open issue for that (bug/req)?

vaxerski commented 7 months ago

you need to add screenshot as path=. There is no blur because there isn't anything to blur.

bvr-yr commented 7 months ago

that's why i asked if it is intended, as i thought blur would work in the same manner as with layer-shell with transparent pixels

vaxerski commented 7 months ago

no it will not work like that