Skip to content
This repository was archived by the owner on May 15, 2022. It is now read-only.

Update library on libraryroot.custom.css change #4

Open
JotaFaD opened this issue Oct 24, 2019 · 8 comments
Open

Update library on libraryroot.custom.css change #4

JotaFaD opened this issue Oct 24, 2019 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@JotaFaD
Copy link

JotaFaD commented Oct 24, 2019

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?

@PhantomGamers
Copy link
Owner

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

@PhantomGamers PhantomGamers self-assigned this Oct 24, 2019
@PhantomGamers PhantomGamers added the enhancement New feature or request label Oct 24, 2019
@JotaFaD
Copy link
Author

JotaFaD commented Oct 24, 2019

Thanks PhantomGamers. Great job on the patcher.

@UrSok
Copy link

UrSok commented Nov 4, 2019

@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.

@PhantomGamers
Copy link
Owner

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.

@GentlePuppet
Copy link

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

@PhantomGamers
Copy link
Owner

@GentlePuppet ...but why?

@GentlePuppet
Copy link

GentlePuppet commented Dec 20, 2019

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.

@zingmars
Copy link

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}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants