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

Any way to dynamically change the workspace number? #210

Open
d00bay opened this issue Nov 8, 2024 · 1 comment
Open

Any way to dynamically change the workspace number? #210

d00bay opened this issue Nov 8, 2024 · 1 comment

Comments

@d00bay
Copy link

d00bay commented Nov 8, 2024

I've been using berrywm on my desktop computer which I built from src. I wanted to have 4 workspaces, I've simply changed WORKSPACE_NUMBER to 4.

I was wondering if there was a way to use berryc in autostart to change in at runtime?

If not, how big an effort would this be?

@JLErvin
Copy link
Owner

JLErvin commented Nov 8, 2024

It's not super easy to change since the project makes pretty liberal usage of arrays to index workspaces. For instance, this is the list of all windows grouped by workspace:

berry/wm.c

Line 30 in c665902

static struct client *c_list[WORKSPACE_NUMBER]; /* 'stack' of managed clients in drawing order */

That being said, is there any reason to not just set the number much higher than you need? You can easily allocate 10 workspaces at compile-time and only use as many as you need. And if you find yourself needing more they will always be there.

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