Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background per window #2

Open
mbpowers opened this issue Dec 15, 2023 · 2 comments
Open

Background per window #2

mbpowers opened this issue Dec 15, 2023 · 2 comments

Comments

@mbpowers
Copy link

I think it would be awesome to be able to set an image on a per window basis using an external command so you could do things like set a music players background to the album cover on song change.

@SpomJ
Copy link

SpomJ commented Dec 15, 2023

I originally suggested it as a window rule. Problem is, it would be much harder to accomplish. The way plugin works now, it basically replaces xray blur framebuffer with an image. This way doesn't interfere that much with actual hyprland code. If you implement it as an actual feature, it would require altering which buffer does the window source.

btw does it compile for you?

@mbpowers
Copy link
Author

gotcha gotcha, makes sense

and assuming I'm doing it right, not compiling for me

I cloned a fresh hyprland and tried most recent commit and also the commit for v33.1 and ran

export HYPRLAND_HEADERS="$HOME/code/_git/Hyprland"
make all
Console output
export HYPRLAND_HEADERS="$HOME/code/_git/Hyprland"
make all
mkdir -p obj
Hyprland headers found.
Building with XWayland support.
g++ -c -o obj/main.o src/main.cpp -g -fPIC --no-gnu-unique -std=c++23 -fdiagnostics-color=always `pkg-config --cflags hyprland pixman-1 libdrm` -Iinclude
src/main.cpp: In function ‘void hijackBlurFramebuffer()’:
src/main.cpp:100:45: error: no matching function for call to ‘CHyprOpenGLImpl::renderTexture(CTexture&, wlr_box*, float, int, bool, bool)’
  100 |                 g_pHyprOpenGL->renderTexture(*g_pTexture, &wholeMonitor, 1.f, 0, false, true);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/hyprland/src/render/Renderer.hpp:8,
                 from /usr/include/hyprland/src/Compositor.hpp:26,
                 from src/main.cpp:8:
/usr/include/hyprland/src/render/OpenGL.hpp:125:27: note: candidate: ‘void CHyprOpenGLImpl::renderTexture(wlr_texture*, CBox*, float, int, bool)’
  125 |     void                  renderTexture(wlr_texture*, CBox*, float a, int round = 0, bool allowCustomUV = false);
      |                           ^~~~~~~~~~~~~
/usr/include/hyprland/src/render/OpenGL.hpp:125:27: note:   candidate expects 5 arguments, 6 provided
/usr/include/hyprland/src/render/OpenGL.hpp:126:27: note: candidate: ‘void CHyprOpenGLImpl::renderTexture(const CTexture&, CBox*, float, int, bool, bool)’
  126 |     void                  renderTexture(const CTexture&, CBox*, float a, int round = 0, bool discardActive = false, bool allowCustomUV = false);
      |                           ^~~~~~~~~~~~~
/usr/include/hyprland/src/render/OpenGL.hpp:126:58: note:   no known conversion for argument 2 from ‘wlr_box*’ to ‘CBox*’
  126 |     void                  renderTexture(const CTexture&, CBox*, float a, int round = 0, bool discardActive = false, bool allowCustomUV = false);
      |                                                          ^~~~~
src/main.cpp:103:45: error: no matching function for call to ‘CHyprOpenGLImpl::renderTexture(CTexture&, wlr_box*, float, int)’
  103 |                 g_pHyprOpenGL->renderTexture(*g_pTexture, &wholeMonitor, 1.f, 0);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/hyprland/src/render/OpenGL.hpp:125:27: note: candidate: ‘void CHyprOpenGLImpl::renderTexture(wlr_texture*, CBox*, float, int, bool)’
  125 |     void                  renderTexture(wlr_texture*, CBox*, float a, int round = 0, bool allowCustomUV = false);
      |                           ^~~~~~~~~~~~~
/usr/include/hyprland/src/render/OpenGL.hpp:125:41: note:   no known conversion for argument 1 from ‘CTexture’ to ‘wlr_texture*’
  125 |     void                  renderTexture(wlr_texture*, CBox*, float a, int round = 0, bool allowCustomUV = false);
      |                                         ^~~~~~~~~~~~
/usr/include/hyprland/src/render/OpenGL.hpp:126:27: note: candidate: ‘void CHyprOpenGLImpl::renderTexture(const CTexture&, CBox*, float, int, bool, bool)’
  126 |     void                  renderTexture(const CTexture&, CBox*, float a, int round = 0, bool discardActive = false, bool allowCustomUV = false);
      |                           ^~~~~~~~~~~~~
/usr/include/hyprland/src/render/OpenGL.hpp:126:58: note:   no known conversion for argument 2 from ‘wlr_box*’ to ‘CBox*’
  126 |     void                  renderTexture(const CTexture&, CBox*, float a, int round = 0, bool discardActive = false, bool allowCustomUV = false);
      |                                                          ^~~~~
src/main.cpp:110:50: error: ‘struct SMonitorRenderData’ has no member named ‘primaryFB’
  110 |     g_pHyprOpenGL->m_RenderData.pCurrentMonData->primaryFB.bind();
      |                                                  ^~~~~~~~~
make: *** [Makefile:75: obj/main.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants