Skip to content
/ waid Public

Track what you're doing all day

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

UnexomWid/waid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About erynNodeJSRust 1.73

WAID or What the fuck am I doing? is a Windows tool that tracks how you use your time.

It has 2 components

  • the Rust client (Windows-only), which detects what you're doing in real time and reports to the server
  • the Node.js server which stores and shows you reports about how you spend your day

demo

Installing

You first need to install Rust and Node.

Then clone this repo and run the setup:

git clone https://github.com/UnexomWid/waid

cd waid

setup.bat

...and that's it ツ

Running

To run WAID, all you have to do is this:

start.bat

This will open 2 terminal tabs. You have to keep both tabs open.

In the client tab you'll see info like the current window title, detected activity, etc.

Every ~5 minutes, the client will send the data to the server. You can see statistics via the browser:

http://localhost:3010

Because updates happen every 5 minutes, you will only see a blank page if you just started the tool. Just wait a bit.

Why only every 5 minutes? Because there's no point in doing it more often at the moment.

You can use the left/right arrow keys to move between days more quickly.

To change which activities you want the tool to detect, see below.

Configuration

The default configuration is ready to go, but you can customize your activity categories as follows.

Client

Open the file client/waid.json.

Categories

You can edit the existing categories, which are used to detect what kind of activity you are doing based on the window that your mouse cursor is hovering on.

Use the default config as an example. If it's still not clear how to add your custom categories, continue reading below.

window_title is an array of regexes; if the current window title matches any of these, the activity is set to that specific category.

process_path is the same, but it looks at the process path of the window. Use \\\\ for path separators, otherwise the regexes won't match!.

url is also an array of regexes; if the current window is a browser, the URL is matched against these values. Currently, only Chrome, Edge and Firefox are supported.

You can include all of those fields inside a category if you need to. The order of matching is:

process_path --no match--> url --no match--> window_title

The priority is based on the order of the categories. The first category is checked first; if it doesn't match, the second is checked, and so on.

Therefore, you should place categories with more specific regexes first, and categories with more general regexes last.

If you add new categories, make sure you assign a color for them in the server config.

Other

user_inactive_threshold (in seconds) means that if you are away from the computer longer than this, the program will stop tracking what you do since you are away. Being away means not using your mouse or keyboard. When you come back, it will resume.

server.endpoint is the server URL that the client will send requests to in order to send the data. When the client sends the data successfully, it is erased locally. Make sure this matches what's in the server config.

server.send_frequency (also in seconds) is how often the client should report the data to the server. 5 mins aka 300s is a good compromise.

Server

Open the file server/config.json. You can change the hostname/port. Make sure they match what's in the client config.

The server config also stores a color for each category, which is used for rendering charts. The list of categories should be the same as in the client config. If you add a new category in the client config, make sure to assign a color for it here.

How it works

Instead of looking at the current focused window, the tool looks at the window over which you are hovering your cursor.

Why? Because you could have focus on the Visual Studio window, while scrolling on Reddit.

It detects the window title and process path, and picks the current activity based on the config file.

If the current window is a browser (Chrome/Edge/Firefox), it also attempts to detect and use the URL in order to pick the current activity.

If you don't use your keyboard or mouse for a period of time (see the client config), the tool will stop tracking until you are active again.

The client periodically sends the tracked time for each activity to the server. If this is successful, it will erase the tracking data locally, because it has been saved on the server.

The request to the server includes a secret which is configurable in the client and server configs, and they should obviously match. This secret defaults to placeholder since the server is configured to run on localhost by default. If you want to host the server somewhere, make sure to use a random secret so that no one else except your client can make updates on the server.

Todo

  • detect games made with Unity
  • use a cache to store pairs of PID -> detected activity

License License: MIT

WAID was created by UnexomWid. It is licensed under MIT OR Apache 2.

About

Track what you're doing all day

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published