From aace45581d871612ea76c001417ca1a6fe40f067 Mon Sep 17 00:00:00 2001 From: Andros Fenollosa Date: Thu, 2 Sep 2021 13:43:58 +0200 Subject: [PATCH] Add requirements --- requirements.txt | 2 ++ src/__main__.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d05c448 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +notify-py==0.3.3 +psutil==5.8.0 diff --git a/src/__main__.py b/src/__main__.py index 728d2c3..22482cd 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -13,10 +13,11 @@ LIMIT_BELOW_BATTERY = 15 MESSAGE_LIMIT_BELOW_BATTERY = "Connect your charger" FILE_NAME_TEMP = "alert_battery_to_maintain_health" PATH_FILE_NAME_TEMP = os.path.join(gettempdir(), FILE_NAME_TEMP) +NOTIFICATION_PATH_ICON = os.path.abspath(os.path.join(__file__, "..", ".." ,"icons/battery-status.png")) NOTIFICATION = Notify( - default_notification_title="Alert battery", - default_application_name="Alert battery", - default_notification_icon=os.path.abspath("icons/battery-status.png"), + default_notification_title="Alert battery", + default_application_name="Alert battery", + default_notification_icon=NOTIFICATION_PATH_ICON, )