A complete desktop environment switcher and profile manager for Lilith Linux, built with Rust and Slint.
Shapeshifter is an official system utility for Lilith Linux, providing desktop environment switching and system profile management.
| Component | Purpose |
|---|---|
| COSMIC Desktop | Desktop Environment |
| Shapeshifter | DE Switching & Profiles |
| Tweakers | System Optimization |
| Lilim | AI Assistant |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/envcargo new shapeshifter
cd shapeshiftermkdir uiCopy the entire contents from the "appwindow.slint - UI Definition" artifact into a new file:
nano ui/appwindow.slint
# or use your preferred text editorPaste the complete Slint code and save the file.
Copy the entire contents from the "Shapeshifter - Profile Manager" artifact into:
nano src/main.rs
# or use your preferred text editorReplace the default "Hello, world!" code with the complete Shapeshifter Rust code and save.
Create a new file in the project root (same level as Cargo.toml):
nano build.rsAdd this content:
fn main() {
slint_build::compile("ui/appwindow.slint").unwrap();
}Save the file.
Replace the contents of Cargo.toml with:
[package]
name = "shapeshifter"
version = "1.0.0"
edition = "2021"
[dependencies]
slint = "1.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = "0.4"
dirs = "5.0"
walkdir = "2.4"
tar = "0.4"
flate2 = "1.0"
reqwest = { version = "0.11", features = ["blocking", "multipart"] }
tokio = { version = "1", features = ["full"] }
[build-dependencies]
slint-build = "1.3"Slint requires some system libraries on Debian:
sudo apt update
sudo apt install -y build-essential libfontconfig1-dev libxcb-render0-dev \
libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev \
libgtk-3-devcargo build --releaseThis will take several minutes the first time as it downloads and compiles dependencies.
./target/release/shapeshifterOr for development/debugging:
cargo runshapeshifter/
├── Cargo.toml
├── build.rs
├── src/
│ └── main.rs (Rust code from artifact)
├── ui/
│ └── appwindow.slint (Slint UI code from artifact)
└── target/ (created by cargo)
- Click "+ New Profile"
- Enter a name (e.g., "My GNOME Setup")
- Optionally check "Save to remote backup"
- Click "Create Profile"
- Click "🖥️ Switch DE" in the sidebar
- Click "Switch" on your desired desktop environment
- Log out and log back in to complete the switch
- Click "📋 Profiles" in the sidebar
- Click "Apply" next to any saved profile
- Follow the instructions in the status bar
- Click "⚙️ Settings"
- Enter your backup URL (e.g.,
https://backup.example.com/profiles) - Click "Save Remote URL"
"command not found: cargo"
- Run:
source $HOME/.cargo/env - Or restart your terminal
Build errors about missing libraries
- Make sure you installed all system dependencies in Step 8
UI doesn't appear
- Check that
ui/appwindow.slintexists and has the correct content - Check that
build.rsexists in the project root
Permission errors when switching DE
- The app modifies
~/.dmrcwhich doesn't require sudo - Modifying
/var/lib/AccountsService/requires sudo (app handles this gracefully)
Create ~/.local/share/applications/shapeshifter.desktop:
[Desktop Entry]
Name=Shapeshifter
Comment=Desktop Environment and Profile Manager
Exec=/path/to/shapeshifter/target/release/shapeshifter
Icon=preferences-desktop
Terminal=false
Type=Application
Categories=System;Settings;Replace /path/to/shapeshifter with your actual project path.