mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 06:32:30 +02:00
taskbar: search user directories first for desktop files
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user