From c8c5e0b90a950bb20c5be5b1c1009889d8540529 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Fri, 8 Jul 2022 16:46:42 +0200 Subject: [PATCH] nix: fix wallpaper location (#334) --- nix/default.nix | 5 +++++ src/render/OpenGL.cpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/nix/default.nix b/nix/default.nix index 495345fd..8ad64f2f 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -61,6 +61,11 @@ stdenv.mkDerivation { ./meson-build.patch ]; + # Fix hardcoded paths to /usr installation + postPatch = '' + sed -i "s#/usr#$out#" src/render/OpenGL.cpp + ''; + passthru.providedSessions = ["hyprland"]; meta = with lib; { diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 42dcec1a..2647a7fa 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -926,6 +926,9 @@ void CHyprOpenGLImpl::createBGTextureForMonitor(SMonitor* pMonitor) { Debug::log(LOG, "Allocated texture for BGTex"); + // TODO: use relative paths to the installation + // or configure the paths at build time + // check if wallpapers exist if (!std::filesystem::exists("/usr/share/hyprland/wall_8K.png")) return; // the texture will be empty, oh well. We'll clear with a solid color anyways.