X-Git-Url: https://adrianiainlam.tk/git/?p=indicator-keyboard-led.git;a=blobdiff_plain;f=indicator-keyboard-led.py;fp=indicator-keyboard-led.py;h=9213a8334336e323230c5a761144795f715403bf;hp=7f78bc650e26cfa34c35f65963d114b75e5cab03;hb=85c1429be09a96705eae40cbe1ac7478064a5130;hpb=94a2b01ee3b85278361899ac959eb9f2aaf26119 diff --git a/indicator-keyboard-led.py b/indicator-keyboard-led.py index 7f78bc6..9213a83 100755 --- a/indicator-keyboard-led.py +++ b/indicator-keyboard-led.py @@ -40,9 +40,9 @@ from gi.repository import Gdk, Gtk, AppIndicator3 APP_NAME = 'indicator-keyboard-led' APP_VERSION = '1.1' -SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) +ICON_LOCATION = '/usr/share/icons/hicolor/scalable/apps/' + APP_NAME + '.svg' import gettext -t = gettext.translation('default', os.path.join(SCRIPT_DIR, 'locale')) +t = gettext.translation(APP_NAME, '/usr/share/locale') _ = t.gettext class IndicatorKeyboardLED: @@ -50,7 +50,7 @@ class IndicatorKeyboardLED: self.validate_order(order) self.indicator = AppIndicator3.Indicator.new( - APP_NAME, os.path.join(SCRIPT_DIR, 'icon.svg'), + APP_NAME, ICON_LOCATION, AppIndicator3.IndicatorCategory.APPLICATION_STATUS) self.indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE)