Skip to content

Conversation

Arkoniak
Copy link

This is a two part PR, it appears when I was tinkering with my waybar config in my ``~/.config/waybar/` directory and occasionally did

includes: [
  "modules/custom.jsonc",
  "modules/groups.jsonc"
]

and suddenly half of my waybar just disappeared. It took me a long time to trace the issue, since there was zero messages in logs, even with -l debug key.

So, as a result here is the PR:

  1. I've added couple of warning statements that elements description is missing. My assumption is that unlike any other elements (e.g. "cpu"), "custom" and "group" elements has no defaults to fall into, so if there is no configuration found (it can be wrong include as in my case, or just a typo) then this element will always be hidden. And so it is legit to warn user that this may happen.

  2. I've added config search for include files in the same manner as regular config search. The only difference, I do not want for existing configs to be broken, so it is slightly more complex than just call findConfigPath. In this implementation if user uses absolute paths they work as usual, and this change only kicks in if user uses relative paths (which I presume mostly case of newcomers).

I've tried it in my environment and it is working as expected.

Also, I am flexible, can split this PR in two if needed or do modifications if some parts of this set up are unacceptable.

@Arkoniak
Copy link
Author

Also added static to be more aligned with tryExpandPath

@Alexays Alexays merged commit 07d3a4d into Alexays:master Aug 8, 2025
9 checks passed
@Alexays
Copy link
Owner

Alexays commented Aug 8, 2025

Thanks!

@kRHYME7
Copy link

kRHYME7 commented Aug 12, 2025

HI @Arkoniak this PR reportedly broke wildcards * ? #4354 ?

@Arkoniak
Copy link
Author

HI @Arkoniak this PR reportedly broke wildcards * ? #4354 ?

Yes, it did, I am sorry. This PR: #4373 addresses this issue.

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

Successfully merging this pull request may close these issues.

4 participants