| Crates.io | get-up-timer |
| lib.rs | get-up-timer |
| version | 0.1.0 |
| created_at | 2025-11-29 16:17:12.241278+00 |
| updated_at | 2025-11-29 16:17:12.241278+00 |
| description | A simple daemon that monitors keyboard and mouse activity and reminds you to take breaks |
| homepage | |
| repository | https://github.com/rvhonorato/get-up-timer |
| max_upload_size | |
| id | 1956912 |
| size | 16,081 |
A simple daemon that monitors your keyboard and mouse activity and reminds you to take breaks.
I often lose track of time and forget to take breaks, so I spent way too much time writing this daemon to keep track of my activity and remind me when its time to take a break! (:
Instead of checking for activity indirectly I decided to just use the /dev/input/by-id interface to measure activity directly. This daemon can identify mouse and keyboard devices so it should be compatible anywhere (at least on Linux).
The daemon tracks your input device activity and cycles through three states:
It writes the current state to /tmp/user_state as JSON, so you can display it in your status bar (something like Waybar).
Just run the standard cargo build command:
cargo build --release
You'll find the binary at target/release/get-up-timer
Since the daemon needs root access to read from /dev/input/by-id/, you'll want to run it as a system service.
Create /etc/systemd/system/get-up-timer.service:
[Unit]
Description=Get Up Timer
After=multi-user.target
[Service]
ExecStart=/path/to/get-up-timer
# For testing with debug mode:
# ExecStart=/path/to/get-up-timer --debug
Restart=on-failure
[Install]
WantedBy=multi-user.target
Then enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable get-up-timer
sudo systemctl start get-up-timer
You can check if it's running with:
sudo systemctl status get-up-timer
If you're using Waybar, just add this to your config:
"custom/get-up-timer": {
"exec": "cat /tmp/user_state",
"return-type": "json",
"interval": 1
}
Right now the timing values are hardcoded in src/main.rs:
You can edit these and recompile if you want different timings!
The state file is just JSON with Pango markup for pretty colors:
{
"text": "<span foreground='#a6e3a1'> ● </span>",
"tooltip": "Active: 00:15:42"
}
The different states look like this: