Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use battery level as a cool down #7

Open
hexaredecimal opened this issue Aug 27, 2024 · 0 comments
Open

Use battery level as a cool down #7

hexaredecimal opened this issue Aug 27, 2024 · 0 comments

Comments

@hexaredecimal
Copy link
Owner

If possible use the exact battery levels to show notifications. E.g only warn on 50%.
This is bad because the notification will not show if for example the user logs in while the battery is already less than 50.

if wm.notify_count == 0 {
spawn(
"notify-send --urgency=critical -t 5000 'Low Battery Level' --icon=dialog-information",
).unwrap();
wm.notify_count += 1;
}
(WmColors::red(), format!("Danger: {percent}"))
} else if wm.battery <= 50 {
if wm.notify_count == 0 {
spawn(
"notify-send --urgency=critical -t 5000 'Battery Level Warning' --icon=dialog-information",
).unwrap();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant