A script to make VSCode load CSS from a custom URI.
I've added some known vscode resource dir paths (for code
/vscodium-bin
for manjaro/arch and one path from some .deb package).
Patch contents are in the middle of the script. Yes, it literally inserts just one line :) If the patch fails, just adapt it for your version of workbench.html
. Or rewrite it with grep+sed, it will be shorter and won't be so dependent on the exact content of unrelated lines. Something like this:
grep -q "$link" "$file" || sed -i 's|\(\t</head>\)|\t\t'"$link"'\n\1|' "$file"