Implement bar.workspaces.workspaceIconMap in nix #725
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.
I use the alejandra nix recommended formatting in my nix files. It applies to this commit. I can remove them from this PR if they are unwelcome. I noticed some spacing that was off at the bottom so I let the formatter clean things up. I did not see a CONTRIBUTING.md, so I was not sure how this was viewed here.
I added an option type under settings for bar.workspaces.workspaceIconMap.
I put it here instead of breaking it out like layout (breaking it out might be a better option honestly) to match the rest of the config and continue support for the one to one relation from the users perspective. However, Because I added it to settings, I needed to explicitly exclude the workspaceIconMap value so it was not caught in the flattening. This could be a brittle point now. I did not know a better way to handle it without changing a bunch of other stuff too?
I noticed other lists did not pretty print their options, so I abandoned my attemps at pretty printing.
This works for my hyprpanel config with the latest nixos right now. Would love more eyes on this though. This is my first PR for nix changes. I am sure there is room for improvement. Happy to accept edits
The code utilization looks like this, which follows the expected pattern: