diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-20 15:02:47 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-20 15:03:09 +0000 |
| commit | 71a95a581f86a801b1db24a417f41d9a395cab38 (patch) | |
| tree | ae6167809c2586c84f0a640543bd85a83aca3ac2 /src/Compositor.cpp | |
| parent | 788a8f7c134a34085d683e44a328e344be6b21f3 (diff) | |
feat: add pretty notifications
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 924de252..25950a27 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2292,3 +2292,13 @@ int CCompositor::getNewSpecialID() { return highest + 1; } + +void CCompositor::performUserChecks() { + static constexpr auto BAD_PORTALS = {"kde", "gnome", "wlr"}; + + if (std::ranges::any_of(BAD_PORTALS, [&](const std::string& portal) { return std::filesystem::exists("/usr/share/xdg-desktop-portal/portals/" + portal + ".portal"); })) { + // bad portal detected + g_pHyprNotificationOverlay->addNotification("You have one or more incompatible xdg-desktop-portal impls installed. Please remove incompatible ones to avoid issues.", + ICONS_COLORS[ICON_ERROR], 15000, ICON_ERROR); + } +} |
