Closed BlueManCZ closed 4 years ago
There is nothing
like internal_packages/system-tray/assets/linux/
in there.
This path packed on app.asar:
/opt/mailspring-bin-1.7.2/resources/app.asar/internal_packages/system-tray/assets/linux/
I think it's not worked, because script can not support --path
with packed asar module.
Temporary solution - create symlink:
sudo ln -s /opt/mailspring-bin-1.7.2 /usr/share/mailspring
and fix icon:
sudo -E hardcode-tray --conversion-tool RSVGConvert --size 22 --theme Papirus --only mailspring
But it's not good way, because after update to next release symlink will be broken.
after every update need fix icon, but in your case, you need remap symlink too:
sudo ln -s /opt/mailspring-bin-1.7.3 /usr/share/mailspring
sudo ln -s /opt/mailspring-bin-1.7.4 /usr/share/mailspring
and etc...
I think better solution for that write ebuild maintainer for remove release number from path
Thank you! Symlink did the trick. And I know that with ebuild it would be easier, but I haven't explored the creation of ebuilds much, maybe in the future.
But for example, I have Slack installed from official repository, and its default location is:
> ls /usr/bin/slack -l lrwxrwxrwx 1 root root 21 22. říj 14.27 /usr/bin/slack -> ../../opt/slack/slack
also /opt
folder. So I guess, wouldn't be better implement something like $PATH environmental variable princip, which could contain multiple directories like: /usr/share:/opt
and so on, and instead of putting absolute paths into json database files, use only relative and look for them in specified directories?
And when I mentioned Slack, in slack.json there is path slack/resources/app.asar.unpacked/static/
and in there icons as .png
files. But in my system I found only slack/resources/app.asar.unpacked/dist/static
and icons as .ico
files.
Or does Slack still use base64 icons?
also /opt folder. So I guess, wouldn't be better implement something like $PATH environmental variable princip, which could contain multiple directories like: /usr/share:/opt and so on, and instead of putting absolute paths into json database files, use only relative and look for them in specified directories?
Usualy we set path from AUR & DEB packages. If ebuild maintainer change path for mailspring, we can add this path to database. For example:
"app_path": [
"/usr/share/mailspring/",
"/opt/mailspring-bin"
],
"icons_path": [
"/usr/share/mailspring/resources/",
"/opt/mailspring-bin/resources/"
],
Or does Slack still use base64 icons?
Yes, Slack use Base64 icons and hardcode-tray not support that now.
PS: I'm not developer on this repo and don't know python ((
Hello, i also have installed some applications in /opt
, like Telegram, because there is only a .tar.gz version, so I made a new folder in /opt
and put it there. Also whatsapp-desktop application is installed from the repository/software manager.
Both of these still have their normal colored icons, but the whatsapp-desktop one is the one from my theme, but not the white tray version.
Specs:
EDIT: Telegram now shows the right tray icon after unning hardcode-tray multiple times and doing an app update
@JoeJoeTV Please check this file and make sure that a path where you placed your Whatsapp matches one of the mentioned in the file. It's case-sensitive.
@BlueManCZ I installed whatsapp from then repository, so it installed itself in /opt/whatsapp-desktop/
and there are the right icons in /opt/whatsapp-desktop/resources/app/assets/icon
, but hardcode-tray doesn't use those?
Also, is there no support for telegram, because there is no file in the same folder as the whatsapp.json file you linked?
EDIT: When I run hardcode-tray, it shows me that it did process whatsapp-desktop.
@JoeJoeTV Well, this is probably not a problem of hardcode-tray, because icons are replaced correctly, but the problem of WhatsApp, that it doesn't use those icons. I don't know about Telegram, but maybe it has the same problem, so it's no longer supported.
I looked over the code for a bit and saw, that whatsapp-desktop should be using the icons in the assets/icons directory, but somehow doesn't? I also tried reverting hardcode-tray, but there were only snapshots from today?
I'm afraid I can't help you. I'm out of ideas, I've never been even using Whatsapp. You can create a new issue if nobody response here.
@varlesh I'm gonna try the env variables, although, telegram started doing it by itself after the last update. I'm on Mint 19.3 Cinnamon, so I already have v0.6.1 from the mint repo. Is there a way to revert the changes from hardcode-tray, because the command line option doesn't work and only allows me to reset to today morning. Can I reset the icons manually, does hardcode-tray change the theme files?
reinstall package
@varlesh I tested that environmental variables, but It seems to have no effect at all in my Telegram 2.1.1. Strange.
@BlueManCZ you reboot PC?
@varlesh Why would I do that? With environmental variables this should be enough:
killall telegram-desktop
export TDESKTOP_FORCE_PANEL_ICON=1
export TDESKTOP_DISABLE_TRAY_COUNTER=1
telegram-desktop
But it seems it isn't.
Yes, if you start this as script
@BlueManCZ On your screenshot not Papirus icon theme
@varlesh You are right, that was it. No Papirus icon theme.
Yes, if you start this as script
How?
@nicolasmaia He means you don't need to restart, if you run mentioned commands together.
echo "export TDESKTOP_FORCE_PANEL_ICON=1" >> ~/.profile
echo "export TDESKTOP_DISABLE_TRAY_COUNTER=1" >> ~/.profile
reboot
echo "export TDESKTOP_FORCE_PANEL_ICON=1" >> ~/.profile echo "export TDESKTOP_DISABLE_TRAY_COUNTER=1" >> ~/.profile reboot
Thanks. I just tried this, to no avail.
@nicolasmaia It's worked if this icons for tray available on current icon theme:
telegram-attention-panel
telegram-mute-panel
telegram-panel
@nicolasmaia What you use DE & Icon Theme?
Also i don't know how this worked with snap & flatpak. It's tested with only Telegram binary version from githab releases
Gnome Shell 3.30.2, Icon theme is ZorinBlue-Light.
@nicolasmaia Yea, that's the problem. I guess Zorin theme doesn't have Telegrams tray icons. Switch to Papirus icon theme and try it again. I also created this question to see, if there are any possibilities to force Telegram to use specific icon pack. Another way would be to create symlinks to Papirus icons in your selected icon theme.
Solution with symlinks did the trick for me.
Can you share how you did it with symlinks?
You need to have a Papirus theme installed. I will demonstrate it with Numix-Circle theme, but you should adapt it for yours.
# enter a folder of your icon theme
cd /usr/share/icons/Numix-Circle/16/panel
# and create three symlinks
sudo ln -s /usr/share/icons/Papirus/16x16/panel/telegram-attention-panel.svg telegram-attention-panel.svg
sudo ln -s /usr/share/icons/Papirus/16x16/panel/telegram-mute-panel.svg telegram-mute-panel.svg
sudo ln -s /usr/share/icons/Papirus/16x16/panel/telegram-panel.svg telegram-panel.svg
That's all what I did.
echo "export TDESKTOP_FORCE_PANEL_ICON=1" >> ~/.profile echo "export TDESKTOP_DISABLE_TRAY_COUNTER=1" >> ~/.profile reboot
this was working fine but on latest updates telegram seems to have changed something and now it doesn't work anymore
This env droped. More info here: https://github.com/telegramdesktop/tdesktop/pull/9056
Specifications
4.3
Gentoo Linux
3.24
0.92.4
Mailspring
1.7.2
Expected behavior and actual behavior
I'm trying to find default icons in mailspring directory according to this database file, but all I get is
mailspring/resources/
directory:tree resources -L 1
There is nothing like
internal_packages/system-tray/assets/linux/
in there.I'm trying to run this command:
sudo -E hardcode-tray --conversion-tool RSVGConvert --size 22 --theme Papirus --only mailspring --path /opt/mailspring-bin-1.7.2/resources
But it returns:
No apps to fix!
Am I doing something wrong, or is Mailspring support currently broken?