Skip to content

Commit

Permalink
Fix broken tray icon on Debian 11 (#461)
Browse files Browse the repository at this point in the history
* Tryicon plugin Ayatana library fallback

* Updating debian dependencies

* Updated readme, adding Ayataha Appindicator
  • Loading branch information
mullerdavid committed Sep 21, 2021
1 parent 8f4b9f2 commit c784000
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -82,7 +82,7 @@ sudo zypper install safeeyes

Ensure to meet the following dependencies:

- gir1.2-appindicator3-0.1
- gir1.2-appindicator3-0.1 or gir1.2-ayatanaappindicator3-0.1
- gir1.2-notify-0.7
- libappindicator-gtk3
- python3-psutil
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Expand Up @@ -9,7 +9,7 @@ Homepage: https://github.com/slgobinath/SafeEyes/

Package: safeeyes
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-appindicator3-0.1, python3 (>= 3.5.0), python3-xlib, python3-dbus, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil, python3-croniter
Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-ayatanaappindicator3-0.1, python3 (>= 3.5.0), python3-xlib, python3-dbus, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil, python3-croniter
Description: Safe Eyes
Safe Eyes is a simple tool to remind you to take periodic breaks for your eyes. This is essential for anyone spending more time on the computer to avoid eye strain and other physical problems.
.
Expand Down
9 changes: 7 additions & 2 deletions safeeyes/plugins/trayicon/plugin.py
Expand Up @@ -19,8 +19,13 @@
import datetime
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3 as appindicator
try:
gi.require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3 as appindicator
except:
#fall back to Ayatana
gi.require_version('AyatanaAppIndicator3', '0.1')
from gi.repository import AyatanaAppIndicator3 as appindicator
from gi.repository import Gtk
import logging
from safeeyes import utility
Expand Down

0 comments on commit c784000

Please sign in to comment.