#monitor #events #windows #macos #linux #different #os-monitor

bin+lib os-monitor

OS level monitor for tracking window focus and input events

40 releases

new 0.4.9 Apr 26, 2025
0.4.7 Apr 24, 2025
0.4.3 Mar 29, 2025
0.3.23 Mar 20, 2025
0.1.3 Jan 30, 2025

#338 in Hardware support

Download history 255/week @ 2025-01-25 479/week @ 2025-02-01 182/week @ 2025-02-08 460/week @ 2025-02-15 545/week @ 2025-02-22 431/week @ 2025-03-01 730/week @ 2025-03-08 981/week @ 2025-03-15 570/week @ 2025-03-22 173/week @ 2025-03-29 268/week @ 2025-04-05 51/week @ 2025-04-12 115/week @ 2025-04-19

616 downloads per month
Used in os-monitor-service

MIT license

105KB
2.5K SLoC

Rust 1.5K SLoC // 0.0% comments Objective-C 1K SLoC // 0.1% comments C 166 SLoC // 0.1% comments

Monitor

The monitor is a Rust application that runs on your computer and is responsible for monitoring your activities. It is specifically responsible for monitoring (but not recording) your window, mouse and keyboard activity. Architecture is intended to support multiple platforms.

Implemented platforms:

  • macOS
  • Windows
  • Linux

Supported functionality

Refer to src/platform.README.md for a list of supported functions and their functionality

Example Usage

Refer to main.rs for how the different

Building and Running

cargo build
cargo run

Prerequisites

  • Rust toolchain (install via rustup)
  • For macOS:
    • Xcode Command Line Tools

Architecture

See architecture.md for more information.

Security and Privacy

  • The monitor only tracks event metadata, not content
  • Window titles, application names, and browser urls are captured for context
  • All data processing happens locally

Development Guidelines

Adding OS Support

To add support for a new OS platform:

  1. Create new platform-specific module in src/platform/
  2. Implement native bindings in bindings/
  3. Implement required traits and functions
  4. Update conditional compilation flags
  5. Refer to src/platform.README.md for functionality to mimic

Other notes

Brought over from the original repo: https://github.com/CodeClimbersIO/app-codeclimbers

Dependencies

~4–12MB
~143K SLoC