Hi there,
I have searched google and these forums and have found some similar issues, but none with solutions that apply to me.
I use i3 window manager with i3blocks (from the Arch AUR) for my status bar, and most system tray icons display fine in the lower right of screen. However, after restarting the window manager and some other events such as locking the screen/unlocking the screen, some of the system tray icons disappear and won’t come back unless I close the program and restart it, namely Insync.
My feeling from googling is it’s something to do with QT apps specifically.
I have seen some advice on this forum to install the sni-qt package, however that has a whole bunch of dependencies I don’t want including Qt4.
I have also seen advice to install the gnome-shell-extension-appindicator, however that is specifically for Gnome shell which I don’t use, and I also don’t want to bring in all those dependencies.
Has anyone else experienced this and have a workaround or solution that applies to my setup?
Other than this issue Insync is working great for my needs, but I really need that system tray Icon to be reliably there for my work.
I have been struggling with this issue myself, and brewed my own solution through i3blocks, whith this indicator:
When active:
When inactive:
Plus, clicking on it will open Insync app.
While I try to figure out on how to contribute back with this block to the i3blocks’ contrib repo, here are the scripts:
In i3 config, we exec --no-startup-id "insync start"
In .config/i3/i3blocks.conf:
# Insync indicator
[insync]
label= # this is a cloud from Font Awesome
interval=1
separator=false
and in .config/i3/i3blocks/insync/insync:
#!/usr/bin/env bash
COLOR_RUN=${COLOR_RUN:-#00FF00}
COLOR_DOWN=${COLOR_DOWN:-#FF0000}
com=$(pidof insync)
retval=$?
echo "Insync"
echo "Insync"
# Onclick, we open Insync
[[ -z "${BLOCK_BUTTON}" ]] || insync show
if [ $retval -eq 0 ]; then
echo $COLOR_RUN
else
echo $COLOR_DOWN
# here we could (try to) re-start insync
# Commented out; be careful because if this is failing,
# this script can consume a lot of resources:
# insync start
# funny enough, this would bring back Insync tray icon.
fi
Thanks for your response, but honestly, I think @Ray_Vermey and @Mark_Chataway deserve a very long overdue response, much more than me. They have been posting this since May 2020!
Nice script and indeed restarting Insync makes the icon visible again.
My workaround is when restarting i3, i also restart insync.
That works. @gvisoc solution is much more elegant! Thanks!
I was wondering if we can get insync status (syncing,synced etc) in i3blocks, but the AUR insync command doesn’t fetch those information.
I was looking at insync-headless , but it seems we need a different license. From AUR comments :
This application can only be used with the subscription-based licensing which is marketed as For server. You can’t use your Insync “Desktop” lifetime license.
I’ve been struggling with the same issue on i3wm with Polybar. What I found worked for me was to edit the Polybar launch.sh file with the following changes;
Essentially you added insync kill+restart to Polybar, that is in turn called by i3wm on reload.
I don’t use Polybar, so I may be wrong.
I’ll try to add this to my i3 config directly, thanks for the idea.
Hey kidpixo. I tried adding the killall insync to the i3 config, but it just throws up an error. I saw that the launch.sh already included the killall Polybar, so I figured that was as good a spot as any Normally I only see the Insync icon disappear when I’m working with the config file, but occasionally it will just disappear on it’s own. In the past I would have to log out and back in to correct it. I’m seeing the same with a second program (Cryptomator Appimage). I’ve used the same solution for it also. However, the rest of my tray icons are not affected.
Hi @sugarcrisp thanks for answer.
I just checked and my problem is that I’m using the systemd service to start insync and not directly via i3, maybe I can play with systemd service paramters and see what happens.