Consider allowing theme provided tray icons to work

I am currently using this 1Password package in the AUR that uses the AppImage to install the package. I also use the Papirus Icon Theme which provides 1Password panel icons for use in the system tray. Currently, the only way to update this icon is to directly modify the app.asar electron binary to set a new png icon. This can be done, but is not ideal, particularly when packaged in an AppImage compared to a set of files that is installed on the system. Tools like Hardcode-Tray can be used to update the hardcoded icon, but not when packaged inside an AppImage, due to it needing to be extracted first, then re-packaged.

I am unfamiliar with how Electron interfaces with the system-panel on Linux, but if it is possible, if it could look for theme-provided icons to use in the panel that would be ideal.

For reference, here is Polybar with 1Password open, next to the other theme-provided tray icons on the right.

Thank you very much for such a wonderful product, and creating a fantastic Linux desktop app 🙂


1Password Version: 0.9.2
Extension Version: Not Provided
OS Version: Arch Linux 5.9.6.arch1-1
Sync Type: Not Provided

Comments

  • MikeTMikeT Agile Samurai

    Team Member

    Hi @chrishoage,

    Thanks for sharing this with us. I suspect you might be able to do that once we add more packages to AUR that does not use AppImage format such as deb, tar or other formats that'll fit your distro's support.

    I don't think we want to go out of our way to explicitly look for theme-provided icons, we do want to be consistent with 1Password icons across all themes and platforms but we might change our mind about that.

    Note that we may consider adding a monochrome version of 1Password icon as an option like we do with our 1Password X extension.

  • Thank you for your reply @MikeT!

    To be clear, the issue is specifically that the image path is hard-coded in the electron app.asar binary. While a non AppImage package would allow users to more easily update the hard-coded path in the app.asar binary it still would require users who wish to use an icon theme that provides an icon to modify the packaged electron app.

    The request is, if at all possible (I have never built an electron app so perhaps it is not) look for a user provided tray icon. For example, my icon theme is Papirus-Dark and has a matching panel svg at the following path

    › l /usr/share/icons/Papirus-Dark/24x24/panel/1password-panel.svg 
    .rw-r--r-- 825 root  1 Nov 13:05 /usr/share/icons/Papirus-Dark/24x24/panel/1password-panel.svg
    

    Anyway, having a monochrome option like the 1Password X extension would also be welcome.

    Again thank you for your time.

  • MikeTMikeT Agile Samurai

    Team Member

    I'll bring it up with the team.

  • Last time I tried hardcode-tray for Wire (also an Electron app with the relevant icon files sitting inside an ASAR file), it couldn't handle something or another about it. Remember too that it would need a config for 1Password added to it before it could do anything... In any case, I altered my script to swap Wire's tray icons for my theme-provided one to do a similar thing for 1Password. In case this is of interest to @chrishoage or anyone else, I've put it in a gist here.

    Just beware that it clobbers the only 1Password icon I saw in the ASAR; a quick glance didn't show it being used anywhere in the main UI and replacing it did change the tray icon, so I went for it. But if it is used somewhere in the UI, you'll see an ugly replacement for the original icon, so make your tradeoff as you please 😶

    I haven't yet felt like fussing with apt or dpkg to figure out how to get it to run the script automatically when the 1password package is updated, but that would be a nice way to avoid having to run it manually after an update (and subsequent restart of 1Password).

  • hardcode-tray for 1password does indeed work so long as 1Password isn't installed as an AppImage.

    With Arch I was able to use a Pacman hook to run it every time after 1Password was updated.

    However, since 1Passowrd took over the AUR package for the AppImage I have switched to using that one, since I would prefer to run the code from a trusted source like AgileBits vs the other 1password-bin in the AUR which unpacks the deb

  • BlakeBlake

    Team Member
    edited December 2020

    We do have plans to host 1Password for Linux on our own pacman repo in the near future @chrishoage , so keep your eyes peeled for that!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file