-
-
Notifications
You must be signed in to change notification settings - Fork 723
Create default config #2511
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
Create default config #2511
Conversation
|
@samueloph Mind reviewing the config and see if it works the same for you? As well as check that the fallback mechanism for |
Codecov Report
@@ Coverage Diff @@
## master #2511 +/- ##
==========================================
+ Coverage 10.44% 10.47% +0.02%
==========================================
Files 147 147
Lines 10155 10166 +11
==========================================
+ Hits 1061 1065 +4
- Misses 9094 9101 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
@patrick96 Oh hey, that's pretty cool! |
|
Thanks for taking the time :) It was actually quite nice building a new config from scratch. |
|
@patrick96 Awesome PR, tested here and it's working fine, I just noticed one small issue: And autocomplete doesn't fetch Thank you! PS.: I did the stupidest thing when testing this and accidentally removed my whole ~/.config folder 😱 |
|
Thanks for the review 😃 That bash error must have been here since the bash completion was introduced because that part never changed. But this PR is probably a good place to fix that since I still need to implement the config fallback logic into the completion scripts as well.
Oh no 😱 I hope you had a backup |
|
I confirm the bar also displays correctly on my machine. Edit: self explain my mistake |
|
|
||
| Details on how to setup and configure the bar and each module have been moved to [the wiki](https://github.com/polybar/polybar/wiki/Configuration). | ||
|
|
||
| #### Install the example configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to be consistent and stick to default configuration instead of example. Even if the bar is called example.
The same may go for config -> configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The readme does not reflect this yet because this is not part of a release yet and I don't want new users installing the latest version (which won't have a default config until 3.6 is released) thinking there is a default config.
The readme will be updated, together with the wiki on the next minor release.
a6e769c to
0ab9628
Compare
|
Oh, I forgot to mention, I didn't test it on my laptop, but I think I didn't see anything related to battery usage. PS.: Didn't have a backup for my .config folder, but everything's fine XD |
|
There is no battery module because polybar can't auto-detect batteries (yet). You're right Once battery can be auto-detected we can add it to the default config. |
We search in XDG_CONFIG_DIRS, /etc/xdg, and /etc but only for config.ini Closes polybar#2016
Co-authored-by: dvermd <315743+dvermd@users.noreply.github.com>
Co-authored-by: dvermd <315743+dvermd@users.noreply.github.com>
0ab9628 to
8361733
Compare
|
Alright, I updated both the zsh and bash completion to also show you the bars in |
* Create default config and install to /etc/polybar Closes polybar#2405 * Search for config in /etc We search in XDG_CONFIG_DIRS, /etc/xdg, and /etc but only for config.ini Closes polybar#2016 * Remove config installation from build.sh * Remove userconfig cmake file * Cleanup * Cleanup default config * Update CHANGELOG.md Co-authored-by: dvermd <315743+dvermd@users.noreply.github.com> * Update src/main.cpp Co-authored-by: dvermd <315743+dvermd@users.noreply.github.com> * Add tests for string functions * Support loading bars from fallbacks in /etc * Combine duplicate string_util::contains test Co-authored-by: dvermd <315743+dvermd@users.noreply.github.com>
What type of PR is this? (check all applicable)
Description
I created a default config for polybar that should work everywhere (doesn't use any machine specific settings):
We ship it in
/etc/polybar/config.iniand also now search for configs inXDG_CONFIG_DIRS/polybarand/etc/polybar.The default config uses the following modules:
xworkspacesxwindowfswith just the root directory which should be its own partition hopefullypulseaudio. Should work on most systemsxkeyboardmemorycpunetworkwithinterface-type(bothwiredandwireless)dateIt has pseudo-transparency enabled so that the transparent border works and uses the
monospacefont which should resolve to a sane font on most systems.TODO:
.inionly) in the zsh and bash completion and fix the bash errorRelated Issues & Documents
Closes #2405
Closes #2016
Documentation (check all applicable)
After the release:
We need to update the README and tell people, just running
polybar exampleshould work (because it will load the config in/etc/polybar/config.ini.We should also update any mention of
polybar/doc/configand usepolybar/doc/examples/config.ini(or/etc/polybar/config.ini).After the PR is merged, we can just update the wiki and mention that the default config can be found in
/etc/polybar/config.iniif you are using the latest unreleased version.We should also update any mention of
configwithconfig.iniUpdate any mention of the "example config" or "sample config" with default config.
Remove any mention of the siji, misc-fixed, and unifont from the wiki and potentially adapt to the default config.