Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
nwg-piotr committed Dec 29, 2024
2 parents 9715a81 + c67de89 commit cab8deb
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions azote/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,22 @@
from azote.color_tools import WikiColours

try:
gi.require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3

common.env['app_indicator'] = True
except:
try:
gi.require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3

common.env['app_indicator'] = True
common.env['app_indicator_library'] = 'AppIndicator3'
except (ImportError, ValueError):
gi.require_version('AyatanaAppIndicator3', '0.1')
from gi.repository import AyatanaAppIndicator3 as AppIndicator3

common.env['app_indicator'] = True
common.env['app_indicator_library'] = 'AyatanaAppIndicator3'
except Exception as e:
common.env['app_indicator'] = False
print('libappindicator-gtk3 package not found - tray icon unavailable')
common.env['app_indicator_library'] = None
print('Neither libappindicator-gtk3 nor libayatana-appindicator3 package found - tray icon unavailable')

from azote.__about__ import __version__

Expand Down

0 comments on commit cab8deb

Please sign in to comment.