Add icon
This commit is contained in:
parent
430cc253a2
commit
784dd60736
@ -13,6 +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 = Notify(
|
||||
default_notification_title="Alert battery",
|
||||
default_application_name="Alert battery",
|
||||
default_notification_icon=os.path.abspath("alert_battery_to_maintain_health/icons/battery-status.png"),
|
||||
)
|
||||
|
||||
|
||||
def get_sensor_battery():
|
||||
@ -22,10 +27,9 @@ def get_sensor_battery():
|
||||
|
||||
def send_notification(message, title="Battery"):
|
||||
"""Send native notification"""
|
||||
notification = Notify()
|
||||
notification.title = title
|
||||
notification.message = message
|
||||
notification.send()
|
||||
NOTIFICATION.title = title
|
||||
NOTIFICATION.message = message
|
||||
NOTIFICATION.send()
|
||||
|
||||
|
||||
def create_file_block():
|
||||
|
BIN
alert_battery_to_maintain_health/icons/battery-status.png
Normal file
BIN
alert_battery_to_maintain_health/icons/battery-status.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
Loading…
Reference in New Issue
Block a user