Add options to use a .json extension for the config filename

This commit is contained in:
Yonatan Avhar 2021-05-21 15:54:48 +03:00
parent cf3d6545c3
commit c65ec9e14f

View File

@ -207,9 +207,13 @@ std::tuple<const std::string, const std::string> waybar::Client::getConfigs(
const std::string &config, const std::string &style) const {
auto config_file = config.empty() ? getValidPath({
"$XDG_CONFIG_HOME/waybar/config",
"$XDG_CONFIG_HOME/waybar/config.json",
"$HOME/.config/waybar/config",
"$HOME/.config/waybar/config.json",
"$HOME/waybar/config",
"$HOME/waybar/config.json",
"/etc/xdg/waybar/config",
"/etc/xdg/waybar/config.json",
SYSCONFDIR "/xdg/waybar/config",
"./resources/config",
})