end-4 / dots-hyprland

Modern, feature-rich and accessible desktop configuration.
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
3.34k stars 218 forks source link

No wallpaper on lockscreen #401

Closed LAST7 closed 3 months ago

LAST7 commented 3 months ago

Hi! Firstly thanks a lot for this wonderful dotfile and automated installation scripts!

It seems that there is no wallpaper set for hyprlock after pressing Ctrl+Super+T for running the script switchwall.sh, the background is just in one single color. I notice that the path inside the hyprlock.conf is set to screenshot:

background {
    color = rgba(12131877)
    # path = {{ SWWW_WALL }}
    path = screenshot
    blur_size = 5
    blur_passes = 4
}

I presume that this piece of config are to set the background of the lockscreen to the screenshot of the screen before locked, but why is it not working?

Also I have found some other related code commented inside an ags script:

# wallpath=$(swww query | head -1 | awk -F 'image: ' '{print $2}')
# wallpath_png="$HOME"'/.cache/ags/user/generated/hypr/lockscreen.png'
# convert "$wallpath" "$wallpath_png"
# wallpath_png=$(echo "$wallpath_png" | sed 's/\//\\\//g')
# wallpath_png=$(sed 's/\//\\\\\//g' <<< "$wallpath_png")
...
apply_hyprlock() {
    # Check if scripts/templates/hypr/hyprlock.conf exists
    if [ ! -f "scripts/templates/hypr/hyprlock.conf" ]; then
        echo "Template file not found for hyprlock. Skipping that."
        return
    fi
    # Copy template
    mkdir -p "$HOME"/.cache/ags/user/generated/hypr/
    cp "scripts/templates/hypr/hyprlock.conf" "$HOME"/.cache/ags/user/generated/hypr/hyprlock.conf
    # Apply colors
    # sed -i "s/{{ SWWW_WALL }}/${wallpath_png}/g" "$HOME"/.cache/ags/user/generated/hypr/hyprlock.conf
    for i in "${!colorlist[@]}"; do
        sed -i "s/{{ ${colorlist[$i]} }}/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/hypr/hyprlock.conf
    done

    cp "$HOME"/.cache/ags/user/generated/hypr/hyprlock.conf "$HOME"/.config/hypr/hyprlock.conf
}
...

What should I do if I would like to make the wallpaper set by swww also set as the background of hyprlock?

I got the logs output by hyprlock by executing hyprlock --immediate:

Click to expand ```plain [LOG] | got iface: wl_shm v1 [LOG] | got iface: wl_drm v2 [LOG] | got iface: zwp_linux_dmabuf_v1 v4 [LOG] > Bound to zwp_linux_dmabuf_v1 v4 [LOG] | got iface: wl_compositor v6 [LOG] > Bound to wl_compositor v6 [LOG] | got iface: wl_subcompositor v1 [LOG] | got iface: wl_data_device_manager v3 [LOG] | got iface: zwlr_export_dmabuf_manager_v1 v1 [LOG] | got iface: zwlr_data_control_manager_v1 v2 [LOG] | got iface: zwp_primary_selection_device_manager_v1 v1 [LOG] | got iface: wp_viewporter v1 [LOG] > Bound to wp_viewporter v1 [LOG] | got iface: zwlr_gamma_control_manager_v1 v1 [LOG] | got iface: zwlr_output_power_manager_v1 v1 [LOG] | got iface: xdg_wm_base v6 [LOG] | got iface: wl_seat v9 [LOG] > Bound to wl_seat v9 [LOG] | got iface: wp_presentation v1 [LOG] | got iface: ext_idle_notifier_v1 v1 [LOG] | got iface: zwlr_layer_shell_v1 v4 [LOG] | got iface: org_kde_kwin_server_decoration_manager v1 [LOG] | got iface: zxdg_decoration_manager_v1 v1 [LOG] | got iface: zwlr_output_manager_v1 v4 [LOG] | got iface: zwp_keyboard_shortcuts_inhibit_manager_v1 v1 [LOG] | got iface: zwp_pointer_constraints_v1 v1 [LOG] | got iface: zwp_relative_pointer_manager_v1 v1 [LOG] | got iface: zwp_virtual_keyboard_manager_v1 v1 [LOG] | got iface: zwlr_virtual_pointer_manager_v1 v2 [LOG] | got iface: zwlr_foreign_toplevel_manager_v1 v3 [LOG] | got iface: wp_drm_lease_device_v1 v1 [LOG] | got iface: zwp_tablet_manager_v2 v1 [LOG] | got iface: zwp_idle_inhibit_manager_v1 v1 [LOG] | got iface: zxdg_exporter_v1 v1 [LOG] | got iface: zxdg_importer_v1 v1 [LOG] | got iface: zxdg_exporter_v2 v1 [LOG] | got iface: zxdg_importer_v2 v1 [LOG] | got iface: zwp_pointer_gestures_v1 v3 [LOG] | got iface: zwp_text_input_manager_v3 v1 [LOG] | got iface: zwp_input_method_manager_v2 v1 [LOG] | got iface: xdg_activation_v1 v1 [LOG] | got iface: ext_session_lock_manager_v1 v1 [LOG] > Bound to ext_session_lock_manager_v1 v1 [LOG] | got iface: wp_cursor_shape_manager_v1 v1 [LOG] > Bound to wp_cursor_shape_manager_v1 v1 [LOG] | got iface: wp_tearing_control_manager_v1 v1 [LOG] | got iface: wp_single_pixel_buffer_manager_v1 v1 [LOG] | got iface: xwayland_shell_v1 v1 [LOG] | got iface: hyprland_toplevel_export_manager_v1 v2 [LOG] | got iface: wp_fractional_scale_manager_v1 v1 [LOG] > Bound to wp_fractional_scale_manager_v1 v1 [LOG] | got iface: zwp_text_input_manager_v1 v1 [LOG] | got iface: hyprland_global_shortcuts_manager_v1 v1 [LOG] | got iface: zwlr_screencopy_manager_v1 v3 [LOG] > Bound to zwlr_screencopy_manager_v1 v3 [LOG] | got iface: zxdg_output_manager_v1 v3 [LOG] | got iface: wl_output v4 [LOG] > Bound to wl_output v4 [LOG] [core] dmabufFeedbackMainDevice [LOG] output 49 make Chimei Innolux Corporation model 0x1602 [LOG] output 49 name eDP-1 [LOG] output 49 description Chimei Innolux Corporation 0x1602 (eDP-1) [LOG] output 49 done [LOG] Running on Hyprland [LOG] Locking session [LOG] eglQueryDmaBufModifiersEXT found 13 mods [LOG] bo chose modifier 300000000e08014 [LOG] onLockLocked called [LOG] got fractional 1 [LOG] got fractional 1 [LOG] configure with serial 13297 [LOG] Configuring surface for logical [Vector2D: x: 1920, y: 1080] and pixel [Vector2D: x: 1920, y: 1080] [LOG] [gl] GL_INVALID_OPERATION error generated. and are incompatible [LOG] Got dma frame with size [Vector2D: x: 1920, y: 1080] [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Framebuffer created, status 36053 [LOG] Authenticating [LOG] auth: authenticated for hyprlock [LOG] Unlocking session [LOG] Unlocked, exiting! [LOG] Reached the end, exiting ```
LAST7 commented 3 months ago

okay the reason why path = screenshot is not working seems to be nvidia...

see hyprwm/hyprlock#59.