Closed acarasimon96 closed 2 years ago
recommend use RSVGConvert.
Try remove backup icons and start script again:
sudo rm -rf ~/.config/Hardcode-Tray/*
That's what I did every single time before I ran sudo -E hardcode-tray --apply
again. When I do run sudo -E hardcode-tray --clear-cache
, everything in that directory is already removed not including itself.
hangouts not support now, because does not pass the test On Chrome/Chromium... Also all other chrome-based distros need update. Discord 0.15 not fixed too?
hangouts removed and chrome/chromium updated
Discord 0.15 not fixed too?
Discord has been on 0.15 for a while. Until now, replacing its hardcoded tray icons always worked, and those icons remain even after in-app updates are applied. I swear that this has nothing to do with the database, since Hardcode Tray still backs up the originals properly.
it's impossible, discord have hardcoded path with release number for icons:
{userhome}/.config/discord/0.0.15/modules/discord_desktop_core/
chrome/chromium & vivaldi updated. See previous commits
I can't reproduce this.
With latest commits:
before
after
Does your debug logs still say "Couldn't find PNG file"? I think that's a sign that the script failed to copy the PNG data into the target apps.
Couldn't find a PNG file - it's previous icon files for previous versions Chrome.
"icons": {
"tray-NOT-USED-NOW": {
"original": "8003",
"theme": "google-chrome-tray"
},
"tray-56-NOT-USED-NOW": {
"original": "10153",
"theme": "google-chrome-tray"
},
"tray-60-dev-NOT-USED-NOW": {
"original": "10154",
"theme": "google-chrome-tray"
},
"tray-64-NOT-USED-NOW": {
"original": "10156",
"theme": "google-chrome-tray"
},
"tray-68-NOT-USED-NOW": {
"original": "10158",
"theme": "google-chrome-tray"
},
"tray-77-NOT-USED-NOW": {
"original": "10151",
"theme": "google-chrome-tray"
},
"tray-80-NOT-USED-NOW": {
"original": "9151",
"theme": "google-chrome-tray"
},
"tray-93-NOW-USED": {
"original": "11151",
"theme": "google-chrome-tray"
}
Sorry for causing you confusion, but I was able to write a fix for this strange behavior. With that applied, the script replaces icons properly like it should.
This is caused by the temp file object (that is, temppng
in SVG.to_bin
) not picking up changes after the PNG conversion. Closing and reopening the file in code allowed Hardcode Tray to read the contents of the temp PNG. I have submitted a pull request that includes this fix, and I might possibly add in the future an exception when the script reads nothing out of the temp file.
After I ran a system update, all hardcoded icons that were previously overridden reverted back to their originals as if it was done automatically. The hardcoded icons remained the same no matter how many times I ran the script. The last system update did not upgrade all of the apps that the script found, which are listed below.
I tried all SVG converters available on my system (RSVGConvert, Inkscape, CairoSVG, SVGExport) and different sizes, but the hardcoded icons are still not being replaced.
With some investigation, I found out that Hardcode-Tray isn't reading anything from the temp PNG file. The part of the script in question is line 92 in
HardcodeTray/modules/svg/svg.py
. However, the generated temp PNG files are perfectly readable outside Hardcode-Tray (for example,cat /tmp/tmpxxxxxxxx
).Specifications
Debug log
Edit: Added my Linux kernel version, since this bug deals with temporary files and
/tmp
.