bilelmoussaoui / Hardcode-Tray

Fixes Hardcoded tray icons in Linux
Other
863 stars 63 forks source link

[Icon request] Nicotine+ #638

Closed yochananmarqos closed 4 years ago

yochananmarqos commented 4 years ago

Specifications

Nicotine+ now has Appindicator3 tray icons.

yochananmarqos commented 4 years ago

Thank you. For some reason it didn't apply, though. The commit looks fine, not sure why.

Welcome to Hardcode-Tray!
Hardcode-Tray replaces some icons on the binary files of some applications. 
Please close all the running applications before running Hardcode-Tray script.
Desktop Environment: Other
Scaling Factor: 1
Icon Size: 24
Icon Theme: Papirus-Dark-Maia
Conversion Tool: CairoSVG
To Do: All
1 - Apply
2 - Revert
3 - Clear Backup Cache
Please choose: 1
Applying now..

Bitwarden           [####................................] 1/10 10.0% 0.09s
Chromium            [#######.............................] 2/10 20.0% 0.04s
Google Chrome       [###########.........................] 3/10 30.0% 0.03s
HP Printer          [##############......................] 4/10 40.0% 0.00s
JDownloader         [##################..................] 5/10 50.0% 0.00s
Keybase             [######################..............] 6/10 60.0% 0.02s
MullvadVPN          [#########################...........] 7/10 70.0% 1.29s
Solaar              [#############################.......] 8/10 80.0% 0.00s
Steam               [################################....] 9/10 90.0% 0.00s
Vivaldi             [####################################] 10/10 100.0% 0.01s
Took 1.49s to finish the tasks

Done, Thank you for using the Hardcode-Tray fixer!

hardcode-tray.json:

{
    "blacklist": ["MullvadVPN"],
    "icons": {
        "theme": "Papirus-Dark-Maia",
        "size": 24
    },
    "conversion_tool": "CairoSVG",
    "backup_ignore": true,
    "scaling_factor": 1
}

I removed the config file just in case that made a difference, then it broke for some strange reason:

Welcome to Hardcode-Tray!
Hardcode-Tray replaces some icons on the binary files of some applications. 
Please close all the running applications before running Hardcode-Tray script.
Desktop Environment: Other
Scaling Factor: 1
Icon Size: 22
Icon Theme: Papirus-Dark-Maia
Conversion Tool: Inkscape
To Do: All
1 - Apply
2 - Revert
3 - Clear Backup Cache
Please choose: 1
Applying now..

Traceback (most recent call last):
  File "/usr/sbin/hardcode-tray", line 121, in <module>
    App.execute()
  File "/usr/lib/python3.8/site-packages/HardcodeTray/app.py", line 120, in execute
    delta = app.do_action(action)
  File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/applications/application.py", line 148, in do_action
    self.install()
  File "/usr/lib/python3.8/site-packages/HardcodeTray/decorators.py", line 58, in wrapper
    func(app)
  File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/applications/application.py", line 96, in install
    self.execute(Action.APPLY)
  File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/applications/helpers/binary.py", line 50, in execute
    self.install_icon(icon, icon_path)
  File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/applications/electron.py", line 38, in install_icon
    png_bytes = get_pngbytes(icon)
  File "/usr/lib/python3.8/site-packages/HardcodeTray/utils.py", line 215, in get_pngbytes
    png_bytes = App.svg().to_bin(icon_for_replace,
  File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/svg/svg.py", line 92, in to_bin
    with open(outfile, 'rb') as temppng:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuzm3avri'
varlesh commented 4 years ago

Use RSVGConvert

yochananmarqos commented 4 years ago

I switched to RSVGConvert and the output is the same. Successful, however it didn't detect / apply Nicotine+.

Update: I just installed papirus-icon-theme 20200602 and now it works.