-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat: Mark as AFK when lock screen is shown #69
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to b095e65 in 33 seconds
More details
- Looked at
110
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. aw_watcher_afk/unix.py:48
- Draft comment:
Thelock_screen_shown
function is not implemented for Linux. This will cause the feature to not work on Linux systems. Consider implementing this function to detect if the lock screen is shown on Linux. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is directly related to a change in the diff, specifically the addition of thelock_screen_shown
function. It highlights a potential issue with the current implementation, which is a placeholder. The comment is actionable as it suggests implementing the function for Linux.
The comment might be considered redundant since the code already includes aTODO
comment indicating the need for a Linux implementation. However, it does provide additional context on the impact of not implementing the function.
While theTODO
comment indicates the need for implementation, the review comment emphasizes the importance of this implementation for Linux functionality, which could be valuable for the author.
The comment should be kept as it highlights an important issue with the current placeholder implementation and suggests a necessary action.
2. aw_watcher_afk/afk.py:13
- Draft comment:
The code has not been formatted. Please format the code to improve readability and maintainability. - Reason this comment was not posted:
Confidence changes required:50%
The PR description mentions that the code has not been formatted. It's important to ensure code is properly formatted for readability and maintainability.
Workflow ID: wflow_3SmZurAeGU9oo66B
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -26,6 +26,11 @@ def _getTickCount() -> int: | |||
return c_GetTickCount() | |||
|
|||
|
|||
def lock_screen_shown() -> bool: | |||
# TODO: Windows implementation | |||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lock_screen_shown
function is not implemented for Windows. This will cause the feature to not work on Windows systems. Consider implementing this function to detect if the lock screen is shown on Windows.
@ErikBjare any chance of this getting merged? |
Resolves #66. The user will be marked as AFK if the lock screen is shown and if the user hasn't made inputs for at least 5 seconds. There is currently no configuration option for this amount of time since it seemed unnecessary and this is just a quick check in case the user is doing something on their lock screen.
No changes were made to how the user will be marked as no longer AFK, since the inputs check will already catch them logging back into their machine.
Appears to be working on my macOS machine. I have not added implementations for Windows and Linux.
This PR has not been formatted since I'm not sure what formatter ActivityWatch uses, and since I'm only contributing small fixes and improvements, I haven't taken the time to setup a proper development environment.
Important
Adds AFK detection when lock screen is shown with 5-second inactivity threshold for macOS, with placeholders for Windows and Linux.
afk.py
.macos.py
usingCGSessionCopyCurrentDictionary
.windows.py
andunix.py
.afk.py
.This description was created by for b095e65. It will automatically update as commits are pushed.