CMake, Meson: install config and wallpapers to DATADIR/hypr

OpenGL: get wallpapers dir from DATAROOTDIR
This commit is contained in:
Mihai Fufezan
2024-08-04 15:19:37 +03:00
parent 4ae89e1f22
commit 5dd2c27b63
5 changed files with 20 additions and 11 deletions

View File

@@ -2669,10 +2669,12 @@ void CHyprOpenGLImpl::createBGTextureForMonitor(CMonitor* pMonitor) {
PFB->alloc(pMonitor->vecPixelSize.x, pMonitor->vecPixelSize.y, pMonitor->output->state->state().drmFormat);
if (!m_pBackgroundTexture) {
// TODO: use relative paths to the installation
// or configure the paths at build time
std::string texPath = "";
texPath = "/usr/share/hyprland/wall";
#ifndef DATAROOTDIR
texPath = "/usr/share/hypr/wall";
#else
texPath = std::format("{}{}", DATAROOTDIR, "/hypr/wall");
#endif
// get the adequate tex
if (FORCEWALLPAPER == -1) {