Millennium
repository·main·Indexed 26 days ago
https://github.com/steamclienthomebrew/millenniumAn open-source modding framework for creating and managing Steam Client themes and plugins on Windows, Linux, and macOS. It features custom CSS editing, plugin support, and privacy tools. The ecosystem includes the Millennium SDK for developing React-based UI components and starlight (v1.1.1), a dedicated compiler tool for building plugins.
What's inside Millennium
- starlight is a compiler tool designed specifically for building Millennium plugins. For detailed usage documentation and guides on how to develop plugins, visit the official documentation at https://docs.steambrew.app/plugins.
Use the Millennium SDK to develop plugins
mainThe Millennium SDK is a library used to develop plugins for Millennium. It is an optimistic fork of the decky-frontend-lib used by Decky Loader.
Developers use this library to provide custom React components that are based on the existing React UI components found in the Steam Client. This approach allows you to add UI elements and logic to the Steam Client without clobbering the existing UI. While primarily designed for adding new elements, it can also be used to extend existing Steam Client UI elements.
Understand Millennium bootstrapping shims
mainMillennium uses platform-specific shims to bootstrap itself into Steam. These sub-folders are separate projects from the main Millennium binary and do not compile into the same executable. Depending on your operating system, Millennium relies on the following shims:
- Windows: Uses
wsock32.dll. - Linux: Uses a
libXtst.so.6proxy hook. - macOS (Install, default): Uses a
Steam Millennium.appwrapper and a runtime payload installed viascripts/install_macos.sh. - macOS (Legacy install): Uses a
libtier0_s.dylibreexport proxy installed viascripts/install_macos.sh --tier0-legacy. - macOS (Debug): Uses a
steam_osxwrapper, a bootstrap dylib preload,execvereinjection into the Steam main process, and a child hook that loadshhx64in Steam Helper.
- Windows: Uses
Install Millennium
mainMillennium is an open-source modding framework for Steam Client themes and plugins on Windows and Linux. For a detailed installation guide, refer to the official documentation at https://docs.steambrew.app/users/getting-started/installation.Build starlight from source
mainTo build starlight for your specific platform, refer to the platform-specific build instructions located in/.github/docs/BUILDING_STARLIGHT.md.Build Millennium from source
mainTo build Millennium for your specific platform, refer to the instructions provided in theBUILDING.mdfile located in the.github/docs/directory.Add a new locale to Millennium
mainYou can add new languages to Millennium, provided they are officially supported by Steam (refer to the "Full Platform Supported Languages" section in the Steamworks documentation).
To add a locale:
- Base your new locale on the existing
english.jsonfile found in./src/locales/. - Name your file
lang.json, wherelangis the API language code from the Steam supported language list. - Place the file in the
./src/locales/directory. - Append the new target file to the
localizationFilesarray in./src/typescript/frontend/utils/localization-manager.ts.
- Base your new locale on the existing
Configure BrowserView creation options
mainWhen calling
CreateorCreatePopup, you can pass aBrowserViewCreateOptionsobject to customize the view behavior:Key Type Description bOnlyAllowTrustedPopupsboolean(Optional) Restrict to trusted popups. parentPopupBrowserIDnumber(Optional) The ID of the parent popup browser. strInitialURLstring(Optional) The initial URL to load. strUserAgentIdentifierstring(Optional) The user agent identifier. strUserAgentOverridestring(Optional) Override the user agent string. strVROverlayKeystring(Optional) VR overlay key. Register and notify update listeners
mainIf you need to react to update changes outside of the React component tree (e.g., in a background service or utility), useRegisterUpdateListenerto subscribe to updates andNotifyUpdateListenersto trigger them.Manage application settings and configuration
mainUse the
Appsinterface to modify various Steam client settings for specific applications:- Launch Options:
SetAppLaunchOptions(appId, launchOptions)andGetLaunchOptionsForApp(appId). - Language:
SetAppCurrentLanguage(appId, language)(e.g., "english", "schinese"). - Resolution:
SetAppResolutionOverride(appId, resolution)andGetResolutionOverrideForApp(appId). - Updates & Downloads:
SetAppAutoUpdateBehavior(appId, mode)andSetAppBackgroundDownloadsBehavior(appId, mode). - Library Assets:
SetCustomArtworkForApp(appId, base64, imageType, assetType)andClearCustomArtworkForApp(appId, assetType). - Controller Settings:
SetControllerRumblePreference(appId, value)andShowControllerConfigurator(appId). - Steam Cloud:
ToggleAppSteamCloudEnabled(appId). - Steam Overlay:
ToggleEnableSteamOverlayForApp(appId).
- Launch Options:
Use BrowserManagerHook to manage browser visibility
mainThe
BrowserManagerHookclass is a utility designed to manage the visibility of the main Steam browser window when the Millennium sidebar is open. It prevents the browser window from overlapping the sidebar by hiding the actual browser and replacing it with a captured snapshot (background image) of the browser state. This ensures a seamless visual experience without the browser window physically covering the sidebar UI.Key capabilities:
- Hooking: Patches
SetBoundsandSetVisibleon theMainWindowBrowserManager.m_browserobject. - Snapshotting: Uses
ChromeDevToolsProtocolto capture a JPEG screenshot of the browser target. - Visual Fallback: When the browser is hidden, it applies the snapshot as a background to an input blocker element to prevent flickering and maintain visual continuity.
- Hooking: Patches
Initialize and clean up BrowserManagerHook
mainTo use the
BrowserManagerHook, you must first callhook()to patch the Steam browser methods. You can optionally passskipCheckHealth: trueto bypass the internal health check that monitors if patches are being overwritten by Steam's re-instantiation of browser objects.Always call
unhook()when the feature is no longer needed to restore original Steam behavior and prevent memory leaks or unexpected side effects.