From 03d26c5daf1e46c63b4675ca6d9e97a52c16a23c Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Mon, 8 Jul 2024 22:16:55 +0300 Subject: [PATCH] forgor --- src/path/Path.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/path/Path.cpp b/src/path/Path.cpp index 260ce07..9ad3c59 100644 --- a/src/path/Path.cpp +++ b/src/path/Path.cpp @@ -15,7 +15,7 @@ namespace Hyprutils::Path { if (!homeDir || !std::filesystem::path(homeDir).is_absolute()) return std::nullopt; - return (std::optional) std::string(homeDir).append("/.config"); + return (std::optional)std::string(homeDir).append("/.config"); } std::optional getXdgConfigDirs() { @@ -35,7 +35,7 @@ namespace Hyprutils::Path { if (!xdgConfigHome || !std::filesystem::path(xdgConfigHome).is_absolute()) return std::nullopt; - return (std::optional) xdgConfigHome; + return (std::optional)xdgConfigHome; } std::optional findConfig(std::string programName) { @@ -60,14 +60,13 @@ namespace Hyprutils::Path { static const auto xdgConfigDirs = getXdgConfigDirs(); if (xdgConfigDirs.has_value()) { for (auto dir : xdgConfigDirs.value()) { - if (checkConfigExists(dir, programName)) return (std::optional)dir; } } if (checkConfigExists("/etc/xdg", programName)) - return (std::optional)"/etc/xdg"; + return std::optional("/etc/xdg/hypr/" + programName + ".conf"); if (xdgConfigHomeExists) return xdgConfigHome;