Skip to content

Conversation

@AminZibayi
Copy link

@AminZibayi AminZibayi commented Jun 28, 2025

You can configure regex-based title cleaning rules to modify window titles before they are sent to the server. This is useful for removing application-specific suffixes, temporary states (like unread message counts), or other noisy data from window titles, leading to cleaner and more accurate data aggregation.


Important

Add regex-based title cleaning rules to modify window titles before sending to server, with configuration and documentation updates.

  • Feature:
    • Add regex-based title cleaning rules to modify window titles before sending to server.
    • Implemented in clean_window_title() in main.py and get_title_cleaning_rules() in config.py.
    • Configuration examples added to example-config.toml.
  • Configuration:
    • Users can define rules in ~/.config/activitywatch/aw-watcher-window.toml.
    • Each rule includes app, pattern, and replacement fields.
  • Documentation:
    • Updated README.md with instructions for configuring title cleaning rules.

This description was created by Ellipsis for 18e1877. You can customize this summary. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 18e1877 in 51 seconds. Click for details.
  • Reviewed 180 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. aw_watcher_window/config.py:20
  • Draft comment:
    Inconsistent config access: load_config now returns the full config (without indexing by 'aw-watcher-window') while parse_args still accesses config['aw-watcher-window']. Consider harmonizing how configuration is retrieved.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. aw_watcher_window/config.py:26
  • Draft comment:
    get_title_cleaning_rules() calls load_config_toml() directly, reloading the config. Consider reusing the result from load_config() or caching the cleaning rules to avoid redundant config parsing.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. aw_watcher_window/main.py:43
  • Draft comment:
    In clean_window_title(), regex patterns are recompiled on every call. Consider precompiling the regex patterns (possibly during config loading) to improve performance.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_i0pKdKX8Sb5oBQe5

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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.

1 participant