fix: add battery notif (#441)

* fix: waybar style battery msgs

* Revert "fix: waybar style battery msgs"

This reverts commit 924d998ddda6cb4becc87fabfd7958a0f7ecc773.

* fix: revert changes

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
Rubin Bhandari
2024-11-18 01:55:16 +05:45
committed by GitHub
parent 0028b9484e
commit ac794dccb0
5 changed files with 54 additions and 5 deletions

View File

@@ -32,14 +32,14 @@ const BatteryLabel = (): BarBoxChild => {
const generateTooltip = (timeSeconds: number, isCharging: boolean, isCharged: boolean): string => {
if (isCharged) {
return 'Fully Charged!!!';
return 'Full';
}
const { hours, minutes } = formatTime(timeSeconds);
if (isCharging) {
return `${hours} hours ${minutes} minutes until full`;
return `Time to full: ${hours} h ${minutes} min`;
} else {
return `${hours} hours ${minutes} minutes left`;
return `Time to empty: ${hours} h ${minutes} min`;
}
};