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

Allow running polybar without BAR argument #2526

Merged
merged 4 commits into from Oct 7, 2021

Conversation

dvermd
Copy link
Contributor

@dvermd dvermd commented Oct 6, 2021

The configuration file must declare a single bar to be able to not name
it.

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

This PR allows to run polybar without BAR argument if the configuration only defines one bar.

Related Issues & Documents

Closes #2525

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation. The Home page must be updated
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

The configuration file must declare a single bar to be able to not name
it.
@codecov
Copy link

codecov bot commented Oct 6, 2021

Codecov Report

Merging #2526 (de29523) into master (282b0f4) will decrease coverage by 0.01%.
The diff coverage is 4.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2526      +/-   ##
==========================================
- Coverage   10.47%   10.45%   -0.02%     
==========================================
  Files         147      147              
  Lines       10166    10182      +16     
==========================================
  Hits         1065     1065              
- Misses       9101     9117      +16     
Flag Coverage Δ
unittests 10.45% <4.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
include/components/config.hpp 0.00% <ø> (ø)
include/components/config_parser.hpp 100.00% <ø> (ø)
src/components/config.cpp 0.00% <0.00%> (ø)
src/components/config_parser.cpp 44.72% <0.00%> (-4.94%) ⬇️
src/main.cpp 0.00% <0.00%> (ø)
src/components/command_line.cpp 62.96% <100.00%> (ø)

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 282b0f4...de29523. Read the comment docs.

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

The only blocker is that polybar bar-that-doesnt-exist no longer throws an error.

I also added some suggestion for more user-friendly error messages.

README.md Outdated Show resolved Hide resolved
src/components/config_parser.cpp Show resolved Hide resolved
src/components/config_parser.cpp Outdated Show resolved Hide resolved
Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Thanks a lot 😃

@patrick96 patrick96 merged commit 47b5910 into polybar:master Oct 7, 2021
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.

Allow no bar name if config contains a single bar
2 participants