diff --git a/CHANGELOG.md b/CHANGELOG.md index 3788c1f8..6fc56c82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,8 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [`#956`](https://github.com/polybar/polybar/issues/956), [`#1871`](https://github.com/polybar/polybar/issues/1871), [`#2141`](https://github.com/polybar/polybar/issues/2141)) - - `internal/battery`: `format-low`, `label-low`, `animation-low`, `low-at = - 10`. + - `internal/battery`: `format-low`, `label-low`, `animation-low`, `low-at = 10`. - `internal/cpu`: `format-warn`, `label-warn`, `warn-percentage = 80` - `internal/fs`: `format-warn`, `label-warn`, `warn-percentage = 90` - `internal/memory`: `format-warn`, `label-warn`, `warn-percentage = 90` @@ -35,6 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 speeds are displayed. - `internal/xkeyboard`: `%variant%` can be used to parse the layout variant ([`#316`](https://github.com/polybar/polybar/issues/316)) +- Added .ini extension check to the default config search. + ([`#2323`](https://github.com/polybar/polybar/issues/2323)) ### Changed - Slight changes to the value ranges the different ramp levels are responsible @@ -62,4 +63,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Empty color values are no longer treated as invalid and no longer produce an error. [Unreleased]: https://github.com/polybar/polybar/compare/3.5.3...HEAD -[3.5.3]: https://github.com/polybar/polybar/releases/tag/3.5.3 +[3.5.3]: https://github.com/polybar/polybar/releases/tag/3.5.3 \ No newline at end of file diff --git a/doc/man/polybar.5.rst b/doc/man/polybar.5.rst index 1f139a71..4c2b1761 100644 --- a/doc/man/polybar.5.rst +++ b/doc/man/polybar.5.rst @@ -32,7 +32,9 @@ places in the following order: * If the ``-c`` or ``--config`` command line argument is specified, it will use the path given there. * ``$XDG_CONFIG_HOME/polybar/config`` +* ``$XDG_CONFIG_HOME/polybar/config.ini`` * ``$HOME/.config/polybar/config`` +* ``$HOME/.config/polybar/config.ini`` Syntax ------ diff --git a/src/utils/file.cpp b/src/utils/file.cpp index 756d057d..83f51ddb 100644 --- a/src/utils/file.cpp +++ b/src/utils/file.cpp @@ -303,12 +303,23 @@ namespace file_util { if (exists(confpath)) { return confpath; } + + string iniConfPath = confpath.append(".ini"); + if (exists(iniConfPath)) { + return iniConfPath; + } } + if (env_util::has("HOME")) { confpath = env_util::get("HOME") + "/.config/polybar/config"; if (exists(confpath)) { return confpath; } + + string iniConfPath = confpath.append(".ini"); + if (exists(iniConfPath)) { + return iniConfPath; + } } return ""; }