Update script notification

This commit is contained in:
Andros Fenollosa 2021-09-19 12:33:04 +02:00
parent e01e3b0b4b
commit ae4dbcdfb8
6 changed files with 3 additions and 11 deletions

View File

@ -2,13 +2,9 @@
<img src="icons/battery-status.png" width="200"> <img src="icons/battery-status.png" width="200">
</p> </p>
Alerts you if your battery is overcharged or discharged to extend its performance and health. Alerts you if your battery is overcharged 🌹 or discharged 🥀 to extend its performance and health.
Cross-platform compatibility: **Only Linux**: Want more compatible systems? I look forward to your pull requests to add more notification systems. Check line 25 in `src/__main__.py`.
- Windows.
- MacOS.
- Linux.
- FreeBSD.
# Preview # Preview

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -6,7 +6,6 @@ authors = ["Andros Fenollosa <andros@fenollosa.email>"]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.9" python = "^3.9"
notify-py = "^0.3.3"
psutil = "^5.8.0" psutil = "^5.8.0"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]

View File

@ -1,2 +0,0 @@
notify-py==0.3.3
psutil==5.8.0

View File

@ -22,8 +22,7 @@ def get_sensor_battery():
def send_notification(message, title="🔋Battery🔋"): def send_notification(message, title="🔋Battery🔋"):
"""Send native notification""" """Send native notification"""
os.system(f"echo '{title}: {message}' > /dev/pts/0" os.system(f"echo '{title}: {message}' > /dev/pts/0")
)
def create_file_block(): def create_file_block():