* Create default config and install to /etc/polybar
Closes#2405
* Search for config in /etc
We search in XDG_CONFIG_DIRS, /etc/xdg, and /etc but only for config.ini
Closes#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>
Add a config parser method which, for now, deals only with escaping the
literal backslash character and logs an error message to inform the user
of the coming change.
The error message includes a properly escaped value for the user.
As a result of introducing an escape character('\'):
- Warn the user of any unescaped backslashes, as they will not be
treated as a literal character in the future
- For now, still treat a single backslash as a literal character
- Treat two consecutive backslashes as a single properly escaped
literal backslash
Also:
- Add documentation about the escape character to polybar(5) manpage
- Add info about the escape character to changelog
- Add testcases for ParseLineKeyTest
- Add new test ParseEscapedValueTest
Resolves: First step in #2354
Improve value parsing
- Take value arg in as an rvalue reference and move parsed value back
- Remove unnecessary if statement
- Rename function
- Improve error message
- Improve function description
- Format
Add escape character documentation to manpages
Add information about the escape character to the polybar(5) manpage.
Add info about the esacape character to changelog
Add test cases for ParseLineKeyTest
Fix ParseLineKeyTest test cases
Also make config parser method parse_escaped_value private.
Add tests for escaped_value_parser method
Also remove unsued include statement
Simplify parse_escaped_value in config_parser
Remove unnecessary escaped value generation, so we do not have to keep
track of index differences.
Fix ParseEscapedValueTest test cases
Fix parse_escaped_value
Add more test cases for ParseLineKeyTest
Update CHANGELOG.md
Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
Adress review
- Adjust documentation
- Small code changes
Improve parse_escaped_value
Add initial support for an escape character
Add a config parser method which, for now, deals only with escaping the
literal backslash character and logs an error message to inform the user
of the coming change.
The error message includes a properly escaped value for the user.
As a result of introducing an escape character('\'):
- Warn the user of any unescaped backslashes, as they will not be
treated as a literal character in the future
- For now, still treat a single backslash as a literal character
- Treat two consecutive backslashes as a single properly escaped
literal backslash
Resolves: First step in #2354
Improve value parsing
- Take value arg in as an rvalue reference and move parsed value back
- Remove unnecessary if statement
- Rename function
- Improve error message
- Improve function description
- Format
Add info about the esacape character to changelog
Add test cases for ParseLineKeyTest
Fix ParseLineKeyTest test cases
Also make config parser method parse_escaped_value private.
Add tests for escaped_value_parser method
Also remove unsued include statement
Simplify parse_escaped_value in config_parser
Remove unnecessary escaped value generation, so we do not have to keep
track of index differences.
Fix ParseEscapedValueTest test cases
Add more test cases for ParseLineKeyTest
Adress review
- Adjust documentation
- Small code changes
Remove duplicate testcase from ParseLineKeyTest
Add initial support for an escape character
Add a config parser method which, for now, deals only with escaping the
literal backslash character and logs an error message to inform the user
of the coming change.
The error message includes a properly escaped value for the user.
As a result of introducing an escape character('\'):
- Warn the user of any unescaped backslashes, as they will not be
treated as a literal character in the future
- For now, still treat a single backslash as a literal character
- Treat two consecutive backslashes as a single properly escaped
literal backslash
Resolves: First step in #2354
Improve value parsing
- Take value arg in as an rvalue reference and move parsed value back
- Remove unnecessary if statement
- Rename function
- Improve error message
- Improve function description
- Format
Fix ParseLineKeyTest test cases
Also make config parser method parse_escaped_value private.
Remove duplicate testcase from ParseLineKeyTest
* Added .ini extension check to default config
* Added change to changelog and man page
* Added change to changelog and man page
* removed .vscode folder
* removed new lines in changelog
This allows us to also have the manual as part of the generated html
documentation.
The syntax is also easier to use.
Right now the man page installed on the system is not replaced with the
rst file, this will come in a later step