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

hyprexpo: Feature request for setting rows and columns independently #220

Open
rukmal opened this issue Sep 5, 2024 · 3 comments
Open

Comments

@rukmal
Copy link

rukmal commented Sep 5, 2024

I am trying to create a hyprexpo grid with 3 rows and 4 columns (or vice versa). Looking at overview.cpp, it looks like hyprexpo creates a grid using the columns attribute in the configuration.

Is it possible to add a rows option to enable this behavior? Would you be open to a PR along these lines?

Thanks!

@vaxerski
Copy link
Member

vaxerski commented Sep 5, 2024

mrs welcome, though I fail to see how that would be displayed

@rukmal
Copy link
Author

rukmal commented Sep 6, 2024

I'm thinking empty space at the top and bottom, same color as the config background?

Likely by modifying the drawing process here to include a y offset:

Vector2D SIZE = size.value();
Vector2D tileSize = (SIZE / SIDE_LENGTH);
Vector2D tileRenderSize = (SIZE - Vector2D{GAPSIZE, GAPSIZE} * (SIDE_LENGTH - 1)) / SIDE_LENGTH;
g_pHyprOpenGL->clear(BG_COLOR.stripA());
for (size_t y = 0; y < SIDE_LENGTH; ++y) {
for (size_t x = 0; x < SIDE_LENGTH; ++x) {
CBox texbox = {x * tileRenderSize.x + x * GAPSIZE, y * tileRenderSize.y + y * GAPSIZE, tileRenderSize.x, tileRenderSize.y};
texbox.scale(pMonitor->scale).translate(pos.value());
texbox.round();
CRegion damage{0, 0, INT16_MAX, INT16_MAX};
g_pHyprOpenGL->renderTextureInternalWithDamage(images[x + y * SIDE_LENGTH].fb.m_cTex, &texbox, 1.0, &damage);
}
}
}
.

@vaxerski
Copy link
Member

vaxerski commented Sep 7, 2024

fair enough

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