feat(gui): manage desktop environments from a gtk window
Offer a single window to install and switch between XFCE, GNOME, Plasma, Hyprland and i3. Installation goes through pkexec and pacman, switching uses logind sessions, so neither action requires a reboot.
This commit is contained in:
4 files changed
+487
-12
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace fws {
|
||||
|
||||
struct DesktopProfile {
|
||||
std::string id;
|
||||
std::string name;
|
||||
std::vector<std::string> packages; // pacman targets (packages or groups)
|
||||
std::vector<std::string> sessionNames; // logind Desktop values to match
|
||||
};
|
||||
|
||||
const std::vector<DesktopProfile>& supportedDesktops();
|
||||
|
||||
// True when every pacman target of the profile is installed.
|
||||
bool isDesktopInstalled(const DesktopProfile& profile);
|
||||
|
||||
// Finds an active logind session for the profile.
|
||||
bool findActiveSession(const DesktopProfile& profile, std::string& sessionId);
|
||||
|
||||
// pkexec + pacman command used to install the profile.
|
||||
std::vector<std::string> installArguments(const DesktopProfile& profile);
|
||||
|
||||
} // namespace fws
|
||||
Reference in new issue
Block a user