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"
|
MESSAGE_LIMIT_BELOW_BATTERY = "Connect your charger"
|
||||||
FILE_NAME_TEMP = "alert_battery_to_maintain_health"
|
FILE_NAME_TEMP = "alert_battery_to_maintain_health"
|
||||||
PATH_FILE_NAME_TEMP = os.path.join(gettempdir(), FILE_NAME_TEMP)
|
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():
|
def get_sensor_battery():
|
||||||
@ -22,10 +27,9 @@ def get_sensor_battery():
|
|||||||
|
|
||||||
def send_notification(message, title="Battery"):
|
def send_notification(message, title="Battery"):
|
||||||
"""Send native notification"""
|
"""Send native notification"""
|
||||||
notification = Notify()
|
NOTIFICATION.title = title
|
||||||
notification.title = title
|
NOTIFICATION.message = message
|
||||||
notification.message = message
|
NOTIFICATION.send()
|
||||||
notification.send()
|
|
||||||
|
|
||||||
|
|
||||||
def create_file_block():
|
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