Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a module group feature. A module group contains multiple modules and renders them orthogonal to the bar direction (ie stacked vertically for a horizontal bar and vice versa).
My use case for it is that I want a vertical bar but I want some modules to share the same row on the bar. This may sound like a waste of screen space but I'm using waybar as an overlay that is most often hidden, and show on demand. A screenshot of my setup follows, volume/brightness bars are implemented each with two modules (one for the icon, one for the bar) placed in a group. Progress bars use CSS linear gradients as their background.
The way a group is configured is as follows:
I chose to list modules in a "modules" key to leave space for future additional options for groups (eg. alignment and so on - which would probably be useful for right/bottom-positioned bars). The implementation does not prevent nested groups, but that's currently not very useful as a group direction is orthogonal to the bar, not to its parent.
Please note that I have no significant experience with c++ whatsoever, so my code may leave a lot to be desired. I've been using it as a daily driver for quite some time though so I'm hoping any remaining issues are mostly architecture/style/good practices related.
Let me know what you think.