A time-aware Discord Rich Presence that mirrors my daily routine
My first real-world Python project after completing MIT 6.100L (Introduction to Computer Science and Programming).
This project started from a real-life problem, not a technical one.
I follow a strict daily routine (study blocks, guitar practice, gym, rest), and I often stay in deep focus for long periods.
Because of this, people close to me — especially my girlfriend — would sometimes feel unsure or worried when I was unavailable.
Not because of a lack of care, but because:
- she didn’t always know what I was doing
- or how long I would be busy
- or when I would be free again
Explaining this manually every day was inconsistent and tiring for both of us.
So I asked myself:
Can I make my routine visible automatically, without interrupting my work or constantly explaining myself?
Since we already communicate on Discord, I decided to use Discord Rich Presence as a passive, always-available signal of:
- what I’m currently doing
- how long this state will last
- what comes next
That question became DayFlow RPC.
- Runs locally on my machine
- Tracks the current time of day
- Maps time → activity mode (study, guitar, gym, rest, sleep)
- Updates Discord Rich Presence safely using the official RPC mechanism
- Shows a countdown to when the current state ends
- Indicates what activity comes next
- Handles midnight rollover correctly
- Avoids unnecessary updates to prevent external system spam
This allows someone viewing my status to understand my availability without needing to ask.
This is not a Discord bot and does not automate messages or accounts.
While building this as a beginner project, I encountered real system-design concepts:
- Finite State Machine
(time → current mode) - Time quantization
(continuous representation of hours and minutes) - External system constraints
(safe update frequency) - Human-centric design
(accuracy matters because a real person is reading it) - Day rollover handling
(23 → 0 transition)
Current Time ↓ Mode Selector (state machine) ↓ Time Remaining Calculation ↓ Discord Rich Presence Update
The program runs continuously and updates only when it is safe and meaningful.
- Deep Focus 🚀 (study)
- Guitar Practice 🎸
- Mission Mode: Growth 🧠
- Chill Time 🍿
- Gym 🏋️♂️
- Unwind & Reset 🌙
- Sleep 💤
Each mode includes:
- a clear label
- a description
- an end time
- a countdown to the next state
Below are real screen recordings (GIFs) of DayFlow RPC running live on Discord.
The status updates automatically based on the current time — no manual input.
Shows a full desktop Discord profile with live activity, countdown timer, and next-state preview.
Demonstrates how the same presence appears on Discord mobile — readable, accurate, and reassuring at a glance.
The countdown and mode transitions are driven entirely by local time logic.
No messages, bots, or manual updates are involved.
Below are real screenshots of DayFlow RPC running live on Discord.
The presence updates automatically based on time and activity — no manual input.
Focused study block with a live countdown to the next activity.
Automatically switches when the time window changes.
Long deep-work sessions with accurate remaining time display.
- Python 3
pypresence(Discord Rich Presence)- Standard library only (
datetime,time,math)
No frameworks. No databases. No web servers.
- Real systems are more about state and timing than syntax
- External systems don’t always reflect updates instantly
- Designing for human reassurance changes technical decisions
- Handling time correctly is harder than it looks
- Small, useful tools teach more than large demo projects
- Schedule is currently hardcoded
- Single-user, personal-use tool
- No configuration files or UI
- No persistence between restarts
These choices were intentional to keep the focus on learning core logic.
- Install Python 3
- Install dependency:
pip install pypresence
- Open the Discord desktop app
- Run the script:
python dayflow_rpc.py
Here’s a clean, copy-paste-ready README section you can drop straight into your repo. It’s written so any Linux user can automate it without confusion.
This project can run automatically in the background every time you log in — no terminal, no manual command.
- Linux with GNOME / Pop!_OS / Ubuntu
- Python 3 installed
- Discord installed and set to start on login
Open a terminal and run:
mkdir -p ~/.config/autostart
nano ~/.config/autostart/dayflow-rpc.desktopPaste the following exactly (edit the path if needed):
[Desktop Entry]
Type=Application
Name=DayFlowRPC
Exec=/usr/bin/python3 /home/<YOUR_USERNAME>/DayFlowRPC/dayflowrpc.py
X-GNOME-Autostart-enabled=trueReplace <YOUR_USERNAME> with your Linux username.
- Press Ctrl + O → Enter (save)
- Press Ctrl + X (exit)
Before logging out, test once:
/usr/bin/python3 /home/<YOUR_USERNAME>/DayFlowRPC/dayflowrpc.pyIf Discord is open and the presence appears, autostart will work.
Log out and log back in:
gnome-session-quit --logoutAfter login:
- Open Discord
- Wait ~1–2 minutes
- Your Rich Presence should appear automatically 🎯
- This does NOT start Discord — Discord should already be set to start on login.
- If Discord opens later, the script will still connect once Discord is running.
- The script runs safely using Discord’s Rich Presence (IPC) — no tokens, no self-botting.
- Add retry logic if Discord isn’t open yet
- Convert to a
systemd --userservice for auto-restart - Sync modes with Google Calendar
Once set up, DayFlowRPC becomes part of your system, running silently and reflecting your daily rhythm automatically.
🕯️ Final Note This project isn’t about productivity or automation alone.
It’s about using code to reduce unnecessary worry, improve clarity, and make daily life a little calmer for both myself and the people close to me.




