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

feat: Support reading config from non-regular files #2545

Merged
merged 1 commit into from Oct 24, 2021

Conversation

patrick96
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

We had a check that restricted config files to "regular files".
This check was to restrictive as it didn't allow for things like:

polybar -c <(gen_config)
gen_config | polybar -c /dev/stdin

Now, polybar can easily read config data from stdin.

Related Issues & Documents

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

We had a check that restricted config files to "regular files".
This check was to restrictive as it didn't allow for things like:

```
polybar -c <(gen_config)
gen_config | polybar -c /dev/stdin
```

Now, polybar can easily read config data from stdin.
@codecov
Copy link

codecov bot commented Oct 24, 2021

Codecov Report

Merging #2545 (caf4e79) into master (b5fb442) will increase coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2545      +/-   ##
==========================================
+ Coverage   10.82%   10.85%   +0.03%     
==========================================
  Files         150      150              
  Lines       10746    10759      +13     
==========================================
+ Hits         1163     1168       +5     
- Misses       9583     9591       +8     
Flag Coverage Δ
unittests 10.85% <0.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/utils/file.hpp 77.77% <ø> (ø)
src/components/config_parser.cpp 44.51% <0.00%> (-0.28%) ⬇️
src/utils/file.cpp 31.60% <0.00%> (+0.74%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5fb442...caf4e79. Read the comment docs.

@patrick96 patrick96 merged commit 9e3b537 into polybar:master Oct 24, 2021
@patrick96 patrick96 deleted the config-file-mode branch October 24, 2021 09:25
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.

None yet

1 participant