Compare commits
No commits in common. "90d12289c530ce187405d10367ff15c58314a70f" and "0b38a75977ead0fff06f1fd67048c52ec5d289df" have entirely different histories.
90d12289c5
...
0b38a75977
|
@ -10,10 +10,10 @@
|
|||
recursive = true;
|
||||
};
|
||||
|
||||
systemd.user = {
|
||||
services."adwaita-for-steam-css-patcher" = {
|
||||
systemd.user.services = {
|
||||
"adwaita-for-steam-install" = {
|
||||
Unit = {
|
||||
Description = "Adwaita for Steam CSS Patcher";
|
||||
Description = "Install Adwaita for Steam";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
|
@ -23,26 +23,46 @@
|
|||
cd ~/.local/share/Steam/steamui/css/
|
||||
|
||||
if ! test -f "library.css"; then
|
||||
echo "Steam library.css not found, make sure that you have succesfully executed Steam once!"
|
||||
exit 1;
|
||||
echo "Steam library.css not found, make sure that you have succesfully executed Steam once!"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if ! ${pkgs.gnugrep}/bin/grep -Fxq "/*patched*/" library.css; then
|
||||
echo "Patching steam library..."
|
||||
${pkgs.coreutils}/bin/mv library.css library.original.css
|
||||
${pkgs.coreutils}/bin/touch library.css
|
||||
echo "/*patched*/
|
||||
@import url("https://steamloopback.host/css/library.original.css");
|
||||
@import url("https://steamloopback.host/libraryroot.custom.css");" >> library.css
|
||||
echo "Patching steam library..."
|
||||
${pkgs.coreutils}/bin/mv library.css library.original.css
|
||||
${pkgs.coreutils}/bin/touch library.css
|
||||
echo "/*patched*/
|
||||
@import url("https://steamloopback.host/css/library.original.css");
|
||||
@import url("https://steamloopback.host/libraryroot.custom.css");" >> library.css
|
||||
|
||||
# Pad new library file until it has the same size as the original
|
||||
${pkgs.coreutils}/bin/truncate -r library.original.css library.css
|
||||
# Pad new library file until it has the same size as the original
|
||||
${pkgs.coreutils}/bin/truncate -r library.original.css library.css
|
||||
echo "Done."
|
||||
else
|
||||
echo "Steam library is already patched, nothing to do."
|
||||
echo "Steam library is already patched, nothing to do."
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
"adwaita-for-steam-uninstall" = {
|
||||
Unit = {
|
||||
Description = "Uninstall Adwaita for Steam";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = pkgs.writeShellScript "adwaita-for-steam-uninstaller" ''
|
||||
cd ~/.local/share/Steam/steamui/css/
|
||||
|
||||
if ! test -f "library.original.css"; then
|
||||
echo "Original library.css not found, nothing to undo."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Restoring original Steam library.css..."
|
||||
${pkgs.coreutils}/bin/mv library.original.css library.css
|
||||
echo "Done."
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue