Skip to content

Conversation

@SRWieZ
Copy link
Member

@SRWieZ SRWieZ commented Dec 11, 2024

Several fixes and improvements (with NativePHP/laravel#445)

  • Fix powerMonitor.getSystemIdleState() not working
  • Add events for lock-screen, unlock-screen, shutdown, user-did-become-active, and user-did-resign-active as they are useful for checking the IdleState without constantly polling
  • Add a testing mock

The power monitor facade is really useful, especially for our battery-powered computers.

It just needs some refinement, which is the purpose of this PR.

Here is an example usage:
Capture d’écran 2024-12-11 à 15 00 43

@SRWieZ SRWieZ marked this pull request as ready for review December 12, 2024 09:21
@SRWieZ
Copy link
Member Author

SRWieZ commented Dec 12, 2024

Ready for review!

@SRWieZ SRWieZ changed the title Fixes and improvement to powerMonitor Fixes and improvements to powerMonitor Dec 12, 2024
@simonhamp simonhamp merged commit b51f8a4 into NativePHP:main Dec 18, 2024
5 of 10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants