mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-17 01:02:51 +01:00
hyprpm: clang-format
This commit is contained in:
parent
23c324950d
commit
33e3f0719a
1 changed files with 55 additions and 68 deletions
|
@ -73,9 +73,7 @@ SHyprlandVersion CPluginManager::getHyprlandVersion() {
|
||||||
int commits = 0;
|
int commits = 0;
|
||||||
try {
|
try {
|
||||||
commits = std::stoi(hlcommits);
|
commits = std::stoi(hlcommits);
|
||||||
} catch (...) {
|
} catch (...) { ; }
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_bVerbose)
|
if (m_bVerbose)
|
||||||
std::cout << Colors::BLUE << "[v] " << Colors::RESET << "parsed commit " << hlcommit << " at branch " << hlbranch << " on " << hldate << ", commits " << commits << "\n";
|
std::cout << Colors::BLUE << "[v] " << Colors::RESET << "parsed commit " << hlcommit << " at branch " << hlbranch << " on " << hldate << ", commits " << commits << "\n";
|
||||||
|
@ -878,21 +876,16 @@ void CPluginManager::notify(const eNotifyIcons icon, uint32_t color, int duratio
|
||||||
|
|
||||||
std::string CPluginManager::headerError(const eHeadersErrors err) {
|
std::string CPluginManager::headerError(const eHeadersErrors err) {
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case HEADERS_CORRUPTED:
|
case HEADERS_CORRUPTED: return std::string{Colors::RED} + "✖" + Colors::RESET + " Headers corrupted. Please run hyprpm update to fix those.\n";
|
||||||
return std::string{Colors::RED} + "✖" + Colors::RESET + " Headers corrupted. Please run hyprpm update to fix those.\n";
|
case HEADERS_MISMATCHED: return std::string{Colors::RED} + "✖" + Colors::RESET + " Headers version mismatch. Please run hyprpm update to fix those.\n";
|
||||||
case HEADERS_MISMATCHED:
|
case HEADERS_NOT_HYPRLAND: return std::string{Colors::RED} + "✖" + Colors::RESET + " It doesn't seem you are running on hyprland.\n";
|
||||||
return std::string{Colors::RED} + "✖" + Colors::RESET + " Headers version mismatch. Please run hyprpm update to fix those.\n";
|
case HEADERS_MISSING: return std::string{Colors::RED} + "✖" + Colors::RESET + " Headers missing. Please run hyprpm update to fix those.\n";
|
||||||
case HEADERS_NOT_HYPRLAND:
|
|
||||||
return std::string{Colors::RED} + "✖" + Colors::RESET + " It doesn't seem you are running on hyprland.\n";
|
|
||||||
case HEADERS_MISSING:
|
|
||||||
return std::string{Colors::RED} + "✖" + Colors::RESET + " Headers missing. Please run hyprpm update to fix those.\n";
|
|
||||||
case HEADERS_DUPLICATED: {
|
case HEADERS_DUPLICATED: {
|
||||||
return std::string{Colors::RED} + "✖" + Colors::RESET + " Headers duplicated!!! This is a very bad sign.\n" +
|
return std::string{Colors::RED} + "✖" + Colors::RESET + " Headers duplicated!!! This is a very bad sign.\n" +
|
||||||
" This could be due to e.g. installing hyprland manually while a system package of hyprland is also installed.\n" +
|
" This could be due to e.g. installing hyprland manually while a system package of hyprland is also installed.\n" +
|
||||||
" If the above doesn't apply, check your /usr/include and /usr/local/include directories\n and remove all the hyprland headers.\n";
|
" If the above doesn't apply, check your /usr/include and /usr/local/include directories\n and remove all the hyprland headers.\n";
|
||||||
}
|
}
|
||||||
default:
|
default: break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::string{Colors::RED} + "✖" + Colors::RESET + " Unknown header error. Please run hyprpm update to fix those.\n";
|
return std::string{Colors::RED} + "✖" + Colors::RESET + " Unknown header error. Please run hyprpm update to fix those.\n";
|
||||||
|
@ -900,18 +893,12 @@ std::string CPluginManager::headerError(const eHeadersErrors err) {
|
||||||
|
|
||||||
std::string CPluginManager::headerErrorShort(const eHeadersErrors err) {
|
std::string CPluginManager::headerErrorShort(const eHeadersErrors err) {
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case HEADERS_CORRUPTED:
|
case HEADERS_CORRUPTED: return "Headers corrupted";
|
||||||
return "Headers corrupted";
|
case HEADERS_MISMATCHED: return "Headers version mismatched";
|
||||||
case HEADERS_MISMATCHED:
|
case HEADERS_NOT_HYPRLAND: return "Not running on Hyprland";
|
||||||
return "Headers version mismatched";
|
case HEADERS_MISSING: return "Headers missing";
|
||||||
case HEADERS_NOT_HYPRLAND:
|
case HEADERS_DUPLICATED: return "Headers duplicated";
|
||||||
return "Not running on Hyprland";
|
default: break;
|
||||||
case HEADERS_MISSING:
|
|
||||||
return "Headers missing";
|
|
||||||
case HEADERS_DUPLICATED:
|
|
||||||
return "Headers duplicated";
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return "?";
|
return "?";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue