# unlbslk/arch-deckify architecture

> Architecture diagram of the GitHub repository unlbslk/arch-deckify, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/unlbslk/arch-deckify
- Repository: https://github.com/unlbslk/arch-deckify

## Overview

#### Purpose and execution model
Arch-Deckify is a shell-script-based system provisioner for Arch Linux. It converts a desktop installation into a SteamOS-like dual-session machine: a Gamescope/Steam gaming session plus a selected Wayland desktop session. It is run directly by the user, typically through the remote-shell install command targeting `install.sh`.

#### Primary installer orchestration
`install.sh` is the central control plane. It interactively selects the default desktop session, establishes required package-management capabilities, installs gaming-stack dependencies, and writes system/user integration artifacts. It operates across privileged OS boundaries: pacman repositories/packages, AUR packages, `/etc` configuration, sudoers, udev, SDDM, and user desktop/application shortcuts.
- `install.sh`
- `README.md`

#### Session and display-manager integration
The architecture relies on SDDM autologin/session configuration to make gaming and desktop modes selectable at login and during runtime. Installation creates an `sddm.conf` configuration and a `steamos-session-select` command/interface that switches into `gamescope` or the chosen desktop Wayland session. A passwordless sudoers rule enables this switching path without interrupting the Steam UI.
- `install.sh`
- `change_default_desktop.sh`

#### Gaming-mode runtime
Gaming Mode is provided by the AUR `gamescope-session-steam-git` package, which supplies the Gamescope-based Steam session and dependencies. Steam is installed/enabled alongside supporting runtime tools such as Gamescope, MangoHud, NTFS support, and brightness-control udev setup. The resulting Gamescope session is the primary controller-friendly fullscreen environment.
- `install.sh`
- `icons`

#### Desktop-mode selection and reconfiguration
The selected Wayland desktop session is persisted as the desktop target for `steamos-session-select desktop`. The standalone reconfiguration entry point lets an existing installation change that default without rerunning the complete bootstrap process.
- `change_default_desktop.sh`
- `install.sh`

#### User-facing operational entry points
A Zenity-based GUI helper exposes post-install optional setup and configuration workflows. Installation also creates launch shortcuts for Gaming Mode and the helper, while the update script is intended to be added to Steam as a non-Steam game so system updates can be initiated from the gaming interface.
- `gui_helper.sh`
- `system_update.sh`
- `icons`

#### Optional Decky Loader lifecycle
Decky Loader is explicitly separated from core provisioning. Dedicated scripts install and remove the unofficial Steam plugin-loader integration, allowing users to opt in or reverse it independently of the base dual-session environment.
- `setup_deckyloader.sh`
- `remove_deckyloader.sh`
- `gui_helper.sh`

#### Infrastructure and external dependencies
The supported host is Arch or an Arch-derived distribution with SDDM; KDE Plasma is recommended but other Wayland desktops are intended to work. The installer may bootstrap an AUR helper (`yay` when neither yay nor paru exists), enable Arch multilib, and install from pacman/AUR. Major external services/ecosystems are Arch repositories/AUR, Steam, ChimeraOS’s gamescope-session-steam project, Zenity, SDDM, Flatpak (optional), Bluetooth services, and Decky Loader.

Main entry points: [`install.sh`](https://github.com/unlbslk/arch-deckify/blob/main/install.sh) (Main installer), [`icons`](https://github.com/unlbslk/arch-deckify/tree/main/icons) (Desktop launch shortcuts), [`gui_helper.sh`](https://github.com/unlbslk/arch-deckify/blob/main/gui_helper.sh) (GUI helper), [`setup_deckyloader.sh`](https://github.com/unlbslk/arch-deckify/blob/main/setup_deckyloader.sh) (Install Decky Loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provisioning["Provisioning"]
  node_readme["Installation guidance<br/>documentation<br/>[README.md]"]
  node_installer{{"Main installer<br/>shell orchestrator<br/>[install.sh]"}}
  node_arch_repos[("Arch repos and AUR<br/>package ecosystem")]
  node_aur_helper["AUR helper<br/>package capability"]
  node_host_config["Host configuration<br/>system state"]
end

subgraph group_session["Session Integration"]
  node_sddm["SDDM configuration<br/>display manager"]
  node_session_selector{{"Session selector<br/>privileged command"}}
  node_desktop_target["Selected desktop session<br/>Wayland session target"]
  node_reconfigure_desktop["Change default desktop<br/>shell entry point"]
  node_gaming_session["Gamescope Steam session<br/>gaming runtime"]
  node_steam["Steam<br/>external runtime"]
end

subgraph group_operations["User Operations"]
  node_gui_helper["GUI helper<br/>Zenity workflow<br/>[gui_helper.sh]"]
  node_system_update["System update script<br/>shell entry point<br/>[system_update.sh]"]
  node_shortcuts["Desktop launch shortcuts<br/>user integration"]
end

subgraph group_optional["Optional Extension"]
  node_decky_setup["Install Decky Loader<br/>shell entry point"]
  node_decky_remove["Remove Decky Loader<br/>shell entry point"]
  node_decky["Decky Loader<br/>Steam plugin integration"]
end

node_user(("User<br/>operator"))

node_user -->|"follows"| node_readme
node_user -->|"runs"| node_installer
node_installer -->|"bootstraps if needed"| node_aur_helper
node_installer -->|"enables multilib and installs from"| node_arch_repos
node_aur_helper -->|"accesses"| node_arch_repos
node_installer -->|"provisions"| node_host_config
node_installer -->|"writes"| node_sddm
node_installer -->|"installs"| node_session_selector
node_installer -->|"persists selected"| node_desktop_target
node_installer -->|"installs"| node_gaming_session
node_arch_repos -->|"supplies package"| node_gaming_session
node_sddm -->|"starts through login"| node_session_selector
node_session_selector -->|"switches to gaming"| node_gaming_session
node_session_selector -->|"switches to desktop"| node_desktop_target
node_reconfigure_desktop -->|"updates"| node_desktop_target
node_gaming_session -->|"runs"| node_steam
node_installer -->|"creates"| node_shortcuts
node_shortcuts -->|"launches"| node_gaming_session
node_shortcuts -->|"launches"| node_gui_helper
node_steam -.->|"can launch as non-Steam game"| node_system_update
node_gui_helper -.->|"offers setup"| node_decky_setup
node_decky_setup -->|"installs"| node_decky
node_decky_remove -->|"removes"| node_decky

click node_readme "https://github.com/unlbslk/arch-deckify/blob/main/README.md"
click node_installer "https://github.com/unlbslk/arch-deckify/blob/main/install.sh"
click node_reconfigure_desktop "https://github.com/unlbslk/arch-deckify/blob/main/change_default_desktop.sh"
click node_gui_helper "https://github.com/unlbslk/arch-deckify/blob/main/gui_helper.sh"
click node_system_update "https://github.com/unlbslk/arch-deckify/blob/main/system_update.sh"
click node_shortcuts "https://github.com/unlbslk/arch-deckify/tree/main/icons"
click node_decky_setup "https://github.com/unlbslk/arch-deckify/blob/main/setup_deckyloader.sh"
click node_decky_remove "https://github.com/unlbslk/arch-deckify/blob/main/remove_deckyloader.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_readme,node_installer,node_arch_repos,node_aur_helper,node_host_config toneBlue
class node_sddm,node_session_selector,node_desktop_target,node_reconfigure_desktop,node_gaming_session,node_steam toneAmber
class node_gui_helper,node_system_update,node_shortcuts toneMint
class node_decky_setup,node_decky_remove,node_decky toneRose
class node_user toneNeutral
```

## Components

### Provisioning

- [Installation guidance](https://github.com/unlbslk/arch-deckify/blob/main/README.md): documentation · Documents supported hosts and remote-shell installation. · `README.md`
- [Main installer](https://github.com/unlbslk/arch-deckify/blob/main/install.sh): shell orchestrator · Bootstraps the dual-session machine and writes integration artifacts. · `install.sh`
- **Arch repos and AUR**: package ecosystem · Provides pacman packages and AUR gaming/session packages.
- **AUR helper**: package capability · yay is bootstrapped when yay and paru are absent.
- **Host configuration**: system state · Includes multilib, packages, udev, sudoers, and user integration artifacts.

### Session Integration

- **SDDM configuration**: display manager · Autologin and session setup expose the dual-session environment.
- **Session selector**: privileged command · Switches to Gamescope or the persisted desktop session.
- **Selected desktop session**: Wayland session target · Persisted target for desktop-mode switching.
- [Change default desktop](https://github.com/unlbslk/arch-deckify/blob/main/change_default_desktop.sh): shell entry point · Changes the desktop target without full bootstrap. · `change_default_desktop.sh`
- **Gamescope Steam session**: gaming runtime · Controller-focused fullscreen Steam environment from gamescope-session-steam-git.
- **Steam**: external runtime · Hosts gaming mode and non-Steam operational shortcuts.

### User Operations

- [GUI helper](https://github.com/unlbslk/arch-deckify/blob/main/gui_helper.sh): Zenity workflow · Provides post-install optional setup and configuration flows. · `gui_helper.sh`
- [System update script](https://github.com/unlbslk/arch-deckify/blob/main/system_update.sh): shell entry point · Intended for use from Steam as a non-Steam game. · `system_update.sh`
- [Desktop launch shortcuts](https://github.com/unlbslk/arch-deckify/tree/main/icons): user integration · Launch Gaming Mode and the GUI helper. · `icons`

### Optional Extension

- [Install Decky Loader](https://github.com/unlbslk/arch-deckify/blob/main/setup_deckyloader.sh): shell entry point · Opt-in installation of the unofficial Steam plugin loader. · `setup_deckyloader.sh`
- [Remove Decky Loader](https://github.com/unlbslk/arch-deckify/blob/main/remove_deckyloader.sh): shell entry point · Reverses the optional Decky Loader integration. · `remove_deckyloader.sh`
- **Decky Loader**: Steam plugin integration · Optional plugin-loader ecosystem separate from core provisioning.

### Other components

- **User**: operator · Runs installation and selects a desktop session.

## Connections

- User → Installation guidance: follows
- User → Main installer: runs
- Main installer → AUR helper: bootstraps if needed
- Main installer → Arch repos and AUR: enables multilib and installs from
- AUR helper → Arch repos and AUR: accesses
- Main installer → Host configuration: provisions
- Main installer → SDDM configuration: writes
- Main installer → Session selector: installs
- Main installer → Selected desktop session: persists selected
- Main installer → Gamescope Steam session: installs
- Arch repos and AUR → Gamescope Steam session: supplies package
- SDDM configuration → Session selector: starts through login
- Session selector → Gamescope Steam session: switches to gaming
- Session selector → Selected desktop session: switches to desktop
- Change default desktop → Selected desktop session: updates
- Gamescope Steam session → Steam: runs
- Main installer → Desktop launch shortcuts: creates
- Desktop launch shortcuts → Gamescope Steam session: launches
- Desktop launch shortcuts → GUI helper: launches
- Steam → System update script: can launch as non-Steam game
- GUI helper → Install Decky Loader: offers setup
- Install Decky Loader → Decky Loader: installs
- Remove Decky Loader → Decky Loader: removes
