Merge pull request #3102 from dep4/taskbar-directories
taskbar: search user directories first for desktop files
This commit is contained in:
commit
42dc9cb85f
|
@ -30,6 +30,9 @@ namespace waybar::modules::wlr {
|
|||
static std::vector<std::string> search_prefix() {
|
||||
std::vector<std::string> prefixes = {""};
|
||||
|
||||
std::string home_dir = std::getenv("HOME");
|
||||
prefixes.push_back(home_dir + "/.local/share/");
|
||||
|
||||
auto xdg_data_dirs = std::getenv("XDG_DATA_DIRS");
|
||||
if (!xdg_data_dirs) {
|
||||
prefixes.emplace_back("/usr/share/");
|
||||
|
@ -47,9 +50,6 @@ static std::vector<std::string> search_prefix() {
|
|||
} while (end != std::string::npos);
|
||||
}
|
||||
|
||||
std::string home_dir = std::getenv("HOME");
|
||||
prefixes.push_back(home_dir + "/.local/share/");
|
||||
|
||||
for (auto &p : prefixes) spdlog::debug("Using 'desktop' search path prefix: {}", p);
|
||||
|
||||
return prefixes;
|
||||
|
|
Loading…
Reference in New Issue