Open JotaFaD opened 5 years ago
We should be able to utilize the file system watcher to watch libraryroot.custom.css for changes and then refresh the patched libraryroot.css to trigger Steam to detect the changes, however in the future the client might require a restart when even the original is changed.
I'll look at implementing this though, good suggestion! Thanks
Thanks PhantomGamers. Great job on the patcher.
@Jose-Paulo-FaD You can edit libraryroot.css and save it and then edit it back to normal to update the steam ui without restarting.
Yes, this works but ideally the patcher would do this automatically if it's running. I've been busy but this is still on my to-do list.
I made a batch file to add @import to load a custom css override for skinning the library, there is a readme included. https://cdn.discordapp.com/attachments/537866809311756289/657239229390258197/EnableNewSteamLibrarySkin.zip
@GentlePuppet ...but why?
At the time this tool didn't have the option to make a custom css for the library, I made this batch before the beta first came out, via the leaked beta files around june, and I didn't know there was an update to this tool that added the library css until after my comment before I downloaded the updated version (I was still using 1.2.4.0 the command prompt version :P) A mix of misunderstanding the issue and the old comment before finishing, so you can safely ignore me.
For those who want this effect before it's implemented, I "wrote" (basically copied from here) a powershell script that monitors a folder and appends to a file in the steamui directory (since that seems to be enough to trigger a refresh). My watch path and steamui path is different since my custom css files are symlinked to a version-tracked directory, but it should work just as well if you adjust the filter to *.css files in order to avoid an infinite loop. Also powershell seems a bit finnicky, so if it doesn't seem to do anything try running it using the ISE or dot sourcing it.
$changefile = "C:\Program Files (x86)\Steam\steamui\licenses.txt"
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = "Path\To\Your\CSS\Path"
$watcher.Filter = "*.*"
$watcher.IncludeSubdirectories = $true
$watcher.EnableRaisingEvents = $true
$action = {
$path = $Event.SourceEventArgs.FullPath
$changeType = $Event.SourceEventArgs.ChangeType
Write-Host "$(Get-Date), $changeType, $path"
Add-content $changefile -value "."
}
"Registering events";
#Register-ObjectEvent $watcher "Created" -Action $action
Register-ObjectEvent $watcher "Changed" -Action $action
#Register-ObjectEvent $watcher "Deleted" -Action $action
#Register-ObjectEvent $watcher "Renamed" -Action $action
"Listening to changes"
while ($true) {sleep 1}
Currently, every time I make a change to the libraryroot.custom.css file, a steam restart is required for the changes to be shown. Can this be automated?