Home
Relevant source files
The following files were used as context for generating this wiki page:The Home screen is the central user interface of the Steam Online Fix Launcher (SOFL). It serves as a unified game library, displaying all imported and manually added games in a modern, easy-to-use interface. The primary goal of this screen is to provide a single place for Linux gamers to manage and launch their entire collection, with a special focus on simplifying the process for games that require "Online-Fix" patches.
SOFL is designed with the principles of minimalism, intuitiveness, and performance, following the GNOME Human Interface Guidelines (HIG). The Home screen embodies this by presenting games as a grid of cover art, automatically fetched from services like SteamGridDB, and providing straightforward actions for launching, editing, and managing each title.
Core Concepts and Architecture
SOFL is built on a modern technology stack and follows a modular architecture to ensure maintainability and scalability.
Sources: conventions.md, CONTRIBUTING.md
Technology Stack
- Language: Python 3.10+
- UI Toolkit: GTK4 + LibAdwaita
- Build System: Meson
- Packaging: Flatpak
Sources: CONTRIBUTING.md:46-49, conventions.md:20-23
Project Structure
The project is organized into distinct modules, each with a specific responsibility. This separation of concerns is key to the application's design.
| Directory | Description |
|---|---|
sofl/ | Main application source code. |
sofl/main.py | The application's main entry point. |
sofl/window.py | Defines the main application window (SOFLWindow). |
sofl/game.py | Contains the Game class, representing a single game in the library. |
sofl/store/ | Manages data storage and game state. |
sofl/importer/ | Handles importing games from various sources (Steam, Lutris, etc.). |
sofl/dialogs/ | Contains UI dialogs for adding, installing, and editing games. |
sofl/utils/ | Provides helper functions and utilities. |
Sources: CONTRIBUTING.md:54-62, conventions.md:52-60
High-Level Architecture
The diagram below illustrates the main components of SOFL and their interactions, with the Home screen (SOFLWindow) at the center of user interaction.
This diagram shows how the UI components interact with the application core to manage and display game data, which is persisted as JSON files and enriched by external services.
Sources: sofl/main.py, sofl/game.py, sofl/details_dialog.py
Application Lifecycle and Initialization
The application's startup sequence is orchestrated by the SOFLApplication class, which sets up the environment, loads data, and displays the main window.
Sources: sofl/main.py
Startup Sequence
The following sequence diagram details the key steps from application launch to the Home screen being presented to the user.
This flow shows that upon activation, the application first loads all existing game data from JSON files on disk before showing the main window.
Sources: sofl/main.py:122-132, sofl/main.py:202-209
Game Management
The Home screen's primary function is to display and manage games. This is handled through the Game object and a set of specialized dialogs for adding, installing, and editing game information.
The Game Object
The Game class is a Gtk.Box widget that visually represents a game in the library. It acts as a view controller, wrapping a GameData object that holds the actual state and logic for a game.
This diagram shows that the Game widget delegates its core logic and data handling to the GameData object, separating the UI representation from the data model.
Sources: sofl/game.py:26-51
Adding and Installing Games
Games can be added to the Home screen library in several ways, primarily through the InstallDialog for Online-Fix archives and the DetailsDialog for manual entries.
Online-Fix Installation
The InstallDialog provides a streamlined workflow for installing games from .rar archives, which is a common distribution format for Online-Fix releases.
This process automates the extraction and initial configuration of an Online-Fix game, adding it directly to the library.
Sources: sofl/dialogs/install_dialog.py:179-245
Manual Game Addition
The DetailsDialog is a versatile form used for both adding a new game from scratch and editing an existing one.
- Adding a New Game: When opened without a game context, the dialog allows the user to specify a Name, Developer, Executable, and Game Type. Upon submission, it generates a new
game_id(e.g.,online-fix_1orimported_1) and creates a newGameobject. - Editing an Existing Game: When opened with a
Gameobject, it pre-fills the fields with the game's current data. It also allows changing the game's type between "Online-Fix Game" and "Regular Game," which updates the game'ssourceproperty accordingly.
Sources: sofl/details_dialog.py:91-111, sofl/details_dialog.py:230-275
Configuration and Settings
Many aspects of the Home screen's behavior and content are controlled by settings configured in the SOFLPreferences window.
Sources: sofl/preferences.py
Game Sources and Import
SOFL can import games from various other launchers and sources. These are enabled in the "Import" page of the preferences. When "Auto-import on startup" is enabled, SOFL will run the import process each time it launches.
Sources: sofl/main.py:333-359, sofl/preferences.py:100-101
Online-Fix and Proton Configuration
The preferences window contains a dedicated section for configuring Online-Fix and Proton, which are critical for running many games.
| Setting | Schema Key | Description |
|---|---|---|
| Installation Path | online-fix-install-path | The default directory where new Online-Fix games will be installed. |
| Proton Version | online-fix-proton-version | The specific Proton version to be used for launching Online-Fix games. |
| Auto-Patch | online-fix-auto-patch | If enabled, automatically applies common patches. If disabled, manual patch options are shown. |
| DLL Overrides | online-fix-dll-overrides | A string of DLLs to override, similar to Wine's WINEDLLOVERRIDES. |
Sources: sofl/preferences.py:449-510
Proton Management
SOFL includes a built-in Proton Manager to simplify the handling of GE-Proton versions. This feature is accessible from the "Proton" page in the preferences.
The manager provides the following functionalities:
- List Installed Versions: Scans the Steam compatibility tools directory (
~/.local/share/Steam/compatibilitytools.d) to find already installed Proton versions. - Fetch Available Versions: Asynchronously queries the GitHub API for the latest GE-Proton releases.
- Download and Install: Downloads the selected
.tar.gzrelease, extracts it, and places it in the correct directory for Steam to recognize. - Delete Versions: Removes an installed Proton version from the disk.
This integrated management ensures that users can easily acquire and select the correct Proton version for their games directly within SOFL.
Sources: sofl/preferences.py:569-575, sofl/preferences.py:808-898
Conclusion
The Home screen is the core of the SOFL user experience. It successfully integrates game library management, installation workflows, and deep configuration into a single, cohesive interface. By abstracting away the complexities of setting up Online-Fix games and managing Proton versions, it fulfills its primary goal of making multiplayer gaming on Linux more accessible and user-friendly. The modular architecture and clear data flows ensure that the system is both robust and extensible for future development.