Skip to content

feat: added "count-as-active" setting to always count some apps/titles as active#375

Merged
ErikBjare merged 7 commits intoActivityWatch:masterfrom
ShootingKing-AM:feat-never-treat-as-afk
Oct 17, 2022
Merged

feat: added "count-as-active" setting to always count some apps/titles as active#375
ErikBjare merged 7 commits intoActivityWatch:masterfrom
ShootingKing-AM:feat-never-treat-as-afk

Conversation

@ShootingKing-AM
Copy link
Copy Markdown
Contributor

@ShootingKing-AM ShootingKing-AM commented Oct 11, 2022

  • Never treat some app with process names or titles matching a Regex pattern as AFK
  • Added a browser setting for the same
  • Future todo can be to implement a server query function of the form filter_keyvalues_regex( , "*", ) which will match all event's attrs like categorize() (future url support etc.)

Example data,
x2

Pre-Filter setting,
x

Setting,
y1

Post-Filter setting,
y2

Relevant issues: ActivityWatch/activitywatch#261

- Never treat some app with process names or titles matching a Regex pattern as AFK
- Added a browser setting for the same
- Future todo can be to implement a server query function of the form filter_keyvalues_regex( <events>, "*", <Regex> ) which will match all attr's of event like categorize() (future url support etc.)
@ShootingKing-AM ShootingKing-AM changed the title feat: Never treat apps or titles as afk feat: Never some treat apps or titles as afk Oct 11, 2022
@ShootingKing-AM ShootingKing-AM changed the title feat: Never some treat apps or titles as afk feat: Never treat some apps or titles as afk Oct 11, 2022
Copy link
Copy Markdown
Member

@ErikBjare ErikBjare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Thank you so much for this!

Just some comments, eager to merge soon :)

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 12, 2022

Codecov Report

Base: 25.58% // Head: 25.69% // Increases project coverage by +0.10% 🎉

Coverage data is based on head (c71e434) compared to base (1980a40).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #375      +/-   ##
==========================================
+ Coverage   25.58%   25.69%   +0.10%     
==========================================
  Files          26       26              
  Lines        1442     1448       +6     
  Branches      226      229       +3     
==========================================
+ Hits          369      372       +3     
- Misses       1020     1046      +26     
+ Partials       53       30      -23     
Impacted Files Coverage Δ
src/stores/activity.ts 32.19% <ø> (ø)
src/stores/settings.ts 21.95% <ø> (ø)
src/queries.ts 47.74% <50.00%> (+0.12%) ⬆️
src/util/time.ts 29.31% <0.00%> (ø)
src/util/color.ts 31.66% <0.00%> (ø)
src/stores/buckets.ts 5.79% <0.00%> (ø)
src/stores/categories.ts 63.15% <0.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

- remove ActivityData wrapping
- Added some consumer friendly explanation in Settings
- Added validation to skip some events
@ErikBjare ErikBjare changed the title feat: Never treat some apps or titles as afk feat: added "count-as-active" setting to always count some apps/titles as active Oct 17, 2022
@ErikBjare ErikBjare merged commit 40e6f25 into ActivityWatch:master Oct 17, 2022
@ErikBjare
Copy link
Copy Markdown
Member

Added some validation and did some testing, works great now!

Thank you for your contribution @ShootingKing-AM ❤️
This feature was a long-time request, happy you stepped up to implement it! ⭐

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