#pragma once #include #include namespace fws { struct DesktopEntry { std::string id; std::string name; std::string exec; std::string desktops; bool wayland = false; }; struct SessionInfo { std::string id; std::string user; std::string seat; std::string tty; std::string type; // x11, wayland, tty, ... std::string desktop; // KDE, GNOME, Hyprland, ... bool active = false; bool graphical = false; }; // Reads /usr/share/xsessions and /usr/share/wayland-sessions. std::vector listInstalledDesktops(); // Reads the current user's graphical sessions from systemd-logind. std::vector listGraphicalSessions(); std::string currentSessionId(); std::string currentDesktopName(); } // namespace fws