diff --git a/src/display.cpp b/src/display.cpp index d2258829..95ee51e5 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -13,6 +13,7 @@ std::string Display::detect_distro() { std::string file_path; + debug("/etc/os-release = \n{}", shell_exec("cat /etc/os-release")); if (!config.m_custom_distro.empty()) { file_path = fmt::format("{}/ascii/{}.txt", CUSTOMFETCH_DATA_DIR, config.m_custom_distro); diff --git a/src/query/system.cpp b/src/query/system.cpp index 86fbed76..b358e2ad 100644 --- a/src/query/system.cpp +++ b/src/query/system.cpp @@ -87,8 +87,8 @@ std::string System::os_name() { std::string line; while (std::getline(os_release_file, line)) { - if(line.find("NAME=") != std::string::npos) { - os_pretty_name = line.substr(5); + if(line.find("ID=") != std::string::npos) { + os_pretty_name = line.substr(3); os_pretty_name.erase(std::remove(os_pretty_name.begin(), os_pretty_name.end(), '\"'), os_pretty_name.end()); return os_pretty_name;