• Stars
    star
    559
  • Rank 79,673 (Top 2 %)
  • Language
    C#
  • License
    MIT License
  • Created over 2 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This utility is designed to allow you to apply skins to the modern Steam client

SFP (Formerly SteamFriendsPatcher)

This utility allows you to apply themes and scripts to the new Steam beta client.

Instructions

  1. Download and extract the latest zip file under Releases for your operating system.
    • If you have .NET 7 installed, download the _net7.zip release; otherwise, download the _SelfContained.zip release.
  2. Run the SFP_UI application.
  3. By default, SFP_UI will automatically wait for Steam to start and inject, or inject if Steam is already running.
  4. For full functionality, SFP must be running with its injector started as long as Steam is running.
  5. Steam must be running with the -cef-enable-debugging argument for SFP to work.
    • If Steam is started with SFP, it will do this automatically. Otherwise, you can use the "Force Steam arguments" setting to automatically restart Steam with the chosen arguments if it does not already have them.
    • This setting is enabled by default
  6. Use the "Open File" button in SFP to access the files where your custom skins and scripts are applied from.

Features

Steam Skinning

  • Reads and applies custom CSS to Steam pages.
    • Customize which files apply to which pages in the skin config.
    • By default, SFP applies skins from:
      • Skins for the Steam client, library, and overlay go in Steam/steamui/libraryroot.custom.css.
      • Skins for the friends list and chat windows go in Steam/steamui/friends.custom.css.
      • Skins for the Steam store and community pages go in Steam/steamui/webkit.css.
      • Skins for Big Picture Mode go in Steam/steamui/bigpicture.custom.css.

Scripting

  • Reads and applies custom JavaScript to Steam pages.
    • Customize which files apply to which pages in the skin config.
    • By default, SFP applies scripts from:
      • Scripts for the Steam client, library, and overlay go in Steam/steamui/libraryroot.custom.js.
      • Scripts for the friends list and chat windows go in Steam/steamui/friends.custom.js.
      • Scripts for the Steam store and community pages go in Steam/steamui/webkit.js.
      • Scripts for Big Picture Mode go in Steam/steamui/bigpicture.custom.js.

Skins and Scripts in Separate Folders

  • Skins and scripts can also be added to their own folders within Steam/steamui/skins and then selected in SFP's settings.

Enable JavaScript Injection

  • JavaScript injection is disabled by default and must be enabled in SFP's settings.
  • JavaScript code can potentially be malicious, so only install scripts from people you trust!

Skin Authors

If you want to customize which Steam pages are skinned and which files are applied to each page, include a skin.json file in the root of your skin folder.

Default skin.json:

{
  "Patches": [
    {
      "MatchRegexString": "https://store.steampowered.com",
      "TargetCss": "webkit.css",
      "TargetJs": "webkit.js"
    },
    {
      "MatchRegexString": "https://steamcommunity.com",
      "TargetCss": "webkit.css",
      "TargetJs": "webkit.js"
    },
    {
      "MatchRegexString": "^Steam$",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": "^OverlayBrowser_Browser$",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": "^SP Overlay:",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": "Menu$",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": "Supernav$",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": "^notificationtoasts_",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": "^SteamBrowser_Find$",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": "^OverlayTab\\d+_Find$",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": "^Steam Big Picture Mode$",
      "TargetCss": "bigpicture.custom.css",
      "TargetJs": "bigpicture.custom.js"
    },
    {
      "MatchRegexString": "^QuickAccess_",
      "TargetCss": "bigpicture.custom.css",
      "TargetJs": "bigpicture.custom.js"
    },
    {
      "MatchRegexString": "^MainMenu_",
      "TargetCss": "bigpicture.custom.css",
      "TargetJs": "bigpicture.custom.js"
    },
    {
      "MatchRegexString": ".friendsui-container",
      "TargetCss": "friends.custom.css",
      "TargetJs": "friends.custom.js"
    },
    {
      "MatchRegexString": ".ModalDialogPopup",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    },
    {
      "MatchRegexString": ".FullModalOverlay",
      "TargetCss": "libraryroot.custom.css",
      "TargetJs": "libraryroot.custom.js"
    }
  ]
}

Each entry should have a "MatchRegexString" key, where the value is either a regex string that will be matched against a Steam page title or a url that begins with http:// or https:// that will be matched against a url.

Each entry can also have a TargetCss key and a TargetJs key, which will be the css and js files that are applied to the page if the regex matches.

An entry can have both a TargetCss and a TargetJs key, or just one of them.

Each target can only have one Css and one Js file injected at a time, with the first match taking precedence, so order your patches correctly.

If you would like to use SFP's default config you can simply omit the skin.json file or include this:

{
    "UseDefaultPatches": true
}

If that key is included along with custom patches, the custom patches will be applied first, followed by the default patches.

Matching against pages with variable titles

Certain pages will have titles that change either depending on the user's language settings or some other factor.

In order to match against these pages, you can match against a selector that exists within the page. SFP will match against a selector if MatchRegexString begins with ., #, or [.

For example:

  • The Friends List and Chat windows can be matched against with .friendsui-container

  • The library game properties dialog and most of the dialogs that pop up in the overlay menu can be matched against with .ModalDialogPopup

  • The sign in page can be matched against with .FullModalOverlay

Finding Steam Page Titles

To find steam page titles to match against, make sure Steam is running with cef-enable-debugging and then visit http://localhost:8080 in your web browser.

Todo

  • Add ability to install and customize themes directly from SFP

Known Issues

  • None currently

Dependencies

  • .NET 7.0 (Only if not using self contained version)

Credits

More Repositories

1

SteamFriendsPatcher

EnableNewSteamFriendsSkin, now with a GUI and auto scanning!
C#
199
star
2

SUWSF

Somewhat Universal Widescreen Fix
C++
75
star
3

TellTaleWidescreenPatcher

Enables Ultrawide (21:9) support for select TellTale games!
C#
36
star
4

EnableNewSteamFriendsSkin

This program will automatically modify your cached friends.css file so that you can add custom themes to the new Steam friends UI.
C#
22
star
5

DbhFpsPatcher

Detroit Become Human Fps Limit Changer
C#
14
star
6

rdr3-config-scripts

Scripts to automatically configure your Red Dead Redemption 2 PC Settings
PowerShell
9
star
7

BtsFpsPatcher

Beyond: Two Souls Fps Limit Changer
C#
8
star
8

shco-wsf

Widescreen fix for Sherlock Holmes Chapter One
5
star
9

HeatSignatureFPSChanger

Change the FPS cap for Heat Signature
C++
4
star
10

GTA5HK

Macro scripts for Grand Theft Auto V
AutoHotkey
4
star
11

AMemoirBlueUltraWideFix

Adds support for ultrawide resolutions to the game A Memoir Blue
C#
4
star
12

DreamfallChaptersUIFix

Limits problematic UI elements to 16:9 and fixes cutscene FOV for widescreen resolutions in Dreamfall Chapters
C#
3
star
13

SteamConfigPatcher

Automatically modify hidden Steam settings!
Batchfile
3
star
14

laststop-uwfix

BepInEx mod that adds support for ultrawide resolutions (21;9, 32:9, etc) to the game Last Stop
C#
2
star
15

SteamResourcePatcher

C#
2
star
16

DSPAchievementsEnabler

Enables local achievements for modded clients in Dyson Sphere Program
C#
2
star
17

StarsandUIARFix

BepInEx mod for Starsand to fix UI with aspect ratios other than 16:9
C#
1
star
18

AstalonBoundaryRemoval

Removes UI boundaries and cinematic letterboxing (good for ultrawide users) in Astalon: Tears of the Earth
C#
1
star