SafeEyes icon indicating copy to clipboard operation
SafeEyes copied to clipboard

Stopped working on hyprland

Open fdev31 opened this issue 1 year ago • 11 comments

Using Hyprland with gBar or waybar for a long time, recently safeeyes stopped working with a message asking to install OS icons or so...

fdev31 avatar Aug 20 '24 11:08 fdev31

Did you have a working trayicon before?

deltragon avatar Aug 20 '24 11:08 deltragon

Does it work when you install and run snixembed?

https://github.com/slgobinath/SafeEyes/wiki/How-to-install-backend-for-Safe-Eyes-tray-icon#installation-of-snixembed

archisman-panigrahi avatar Aug 20 '24 12:08 archisman-panigrahi

Waybar does depend on libappindicator, so in theory it should already have an implementation of StatusNotifierItem. (Meaning snixembed shouldn't make a difference.)

deltragon avatar Aug 20 '24 12:08 deltragon

Yes it was working. If I run snixembed I get: error: could not acquire watcher name

fdev31 avatar Aug 20 '24 12:08 fdev31

@fdev31 Is there an OS which has hyperland configured by default so that I can test it?

archisman-panigrahi avatar Aug 20 '24 13:08 archisman-panigrahi

Perhaps related to this https://todo.sr.ht/~steef/snixembed/14

There the solution is to add a delay before running snixembed at startup. Try pkill snixembed;sleep 0.5;snixembed --fork

If you are already running snixembed in a session, try closing and reopening it with pkill snixembed;snixembed --fork

archisman-panigrahi avatar Aug 20 '24 13:08 archisman-panigrahi

I think the error: could not aquire watcher name means that there is already a service providing the StatusNotifierWatcher name, so snixembed isn't necessary. This might be another instance of https://github.com/slgobinath/SafeEyes/issues/636, where SafeEyes starts before waybar? @fdev31 Are you starting SafeEyes using an autostart script? Does it work if you start it manually?

deltragon avatar Aug 21 '24 13:08 deltragon

Ok, I commented it there by mistake, so I'll copy it here too ^^

Briliant, indeed, if I delay safeyes startup I don't experience the issue...

fdev31 avatar Aug 21 '24 14:08 fdev31

Briliant, indeed, if I delay safeyes startup I don't experience the issue...

@fdev31 I will add it to the wiki page. Can you please tell me more information about how to add a startup application in hyprland and how you added the delay?

Also, can you delete your comment in the other GitHub issue (because it is not relevant there)?

archisman-panigrahi avatar Aug 21 '24 14:08 archisman-panigrahi

I'm using the desktop file to start it. Will try to see if setting X-GNOME-Autostart-Delay=10, basically I'm starting those desktop apps using dex:

exec-once = dex -a in hyprland.conf

If the variable isn't working, exec-once = sleep 5; dex -a may work.

fdev31 avatar Aug 21 '24 14:08 fdev31

@fdev31 Can you test if this branch https://github.com/deltragon/SafeEyes/tree/trayicon-retry works for you? In case you are using Arch, try this PKGBUILD

pkgname=safeeyes-git
pkgver=2.2.2
pkgrel=2
pkgdesc="A Free and Open Source tool for Linux users to reduce and prevent repetitive strain injury (RSI). Latest version from the git repository"
arch=("any")
url="https://github.com/deltragon/SafeEyes"
license=("GPL3")
depends=("alsa-utils"
         "hicolor-icon-theme"
         "libappindicator-gtk3"
         "python"
         "python-babel"
         "python-dbus"
         "python-gobject"
         "python-psutil"
         "python-xlib"
         "xorg-xprop")
conflicts=("safeeyes")
makedepends=("python-setuptools" "git")
optdepends=("xprintidle: better idle timer"
            "python-croniter: health stats plugin"
            "swayidle: for smart pause")
source=("git+https://github.com/deltragon/SafeEyes.git#branch=trayicon-retry")
sha1sums=('SKIP')

pkgver() {
	cd "$srcdir/SafeEyes"
	git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
	cd "$srcdir/SafeEyes"
	PYTHONUSERBASE="/usr" python setup.py install --root="$pkgdir/" --optimize=1
}

archisman-panigrahi avatar Aug 30 '24 14:08 archisman-panigrahi

This should be fixed since https://github.com/slgobinath/SafeEyes/pull/638 has been merged (you can try it with safeeyes-git AUR). If does not work, please reopen.

archisman-panigrahi avatar Sep 22 '24 03:09 archisman-panigrahi

Ok, I upgraded, if I see the issue again I'll reopen, thank you!

fdev31 avatar Sep 26 '24 10:09 fdev31