Skip to content
XNinety9Public

About

C411 private tracker stats in the Omarchy bar: upload, download and ratio history, forecasts and a what-if calculator. English & French.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

C411 Trend

Version française : README.fr.md.

An Omarchy bar widget for the C411 private tracker. It records your upload, download, ratio, level and Zen through your personal C411 API key, charts them, and forecasts where they are heading: "at this pace, 15 TB uploaded on Nov 12, 2026", "level 38 in 4 days". Ask it about your own targets too: "20 TB uploaded in 2 months", "ratio 5.00 in 8 weeks", "2,000 Zen in 6 days". It also tells you when downloads are blocked and when a freeleech is on.

C411 Trend panel: tiles, chart with the forecast dashed past "now", forecast list and a what-if answer

Install

omarchy plugin add https://github.com/XNinety9/c411trend.git --enable

Then give it an API key, once:

  1. On c411.org, open your profile settings, create an API key and tick the Profile (read) scope (profile:read; it is not ticked by default).
  2. Click the pill in the bar and paste the key in the API key field.

The key is stored in ~/.config/c411trend/api-key, readable by you only. To replace it later, press k in the panel; to revoke it, delete it on c411.org.

Uninstall

omarchy plugin remove x99.c411trend

This deletes ~/.config/omarchy/plugins/x99.c411trend/ and drops the widget from the bar. Your history stays in ~/.local/state/c411trend/ and your API key in ~/.config/c411trend/, so a reinstall picks up where you left off; delete those two directories to erase everything, and revoke the key on c411.org.

What you get

  • Bar pill with your ratio, or any composition of values you like (see Bar label). It turns to the warning colour when downloads are blocked.
  • Alerts at the top of the panel: downloads blocked (with C411's reason), freeleech or silver leech on, leech bonuses active.
  • Tiles: upload, ratio and download, each with its change over 7 days and the credit included; level with its XP bar, Zen balance, and class with its quests and stars.
  • Chart of upload, ratio, download, XP or Zen over 24h, 7d, 30d or everything, with the trend dashed past "now". Hover it for exact values.
  • Forecasts:
    • the next round upload figures and ratio steps, with the estimated date;
    • your own targets (uploadTargetTo, ratioTarget), marked ◆;
    • the next level, and the next round Zen balance;
    • projected upload, download and ratio in 30, 90 and 365 days;
    • the pace per day as a small bar chart: upload/download, or XP/Zen gains based on the selected chart. For Zen, this shows gains, not balance changes. The forecast pace is dashed across it (hover a day for its figures).
  • What if: type a target and read when you get there at the current pace.
    • 10 TB, 850 GB, 1.5 To: an upload amount;
    • ratio 3.5, r 5, 5x: a ratio;
    • 2000 zen, 25000 xp: a Zen balance (assuming you spend none) or an XP total;
    • 5: a bare number could be upload or ratio, so you get both answers;
    • the answer says when ("in 2 months, around Nov 28, 2026"), at what pace, or why not: already reached (with the day it was crossed), no recent activity, or a ratio that levels off before the target;
    • the last question is kept across restarts.

How forecasts work

The pace is the least-squares slope of each counter over the last N days (14 by default, forecastWindowDays): upload, download, XP, and Zen earned (the balance also goes down when you spend, which is not a pace). The projected ratio is derived from the upload and download paces, (U + a·t) / (D + b·t), rather than extrapolated on its own. That is why a target above a/b shows as out of reach at the current pace, and why a falling ratio can be forecast too ("ratio falls to 1.00 in 3 weeks"). The next level comes from the XP left to it, as C411 reports, at your XP pace. Forecasts appear once there is an hour of history; they settle as the window fills.

If C411 loses data and your counters go back (a crash, a restore from backup), the pace only counts increases between readings: the drop is not negative activity. Forecasts restart from the real counter, and the panel says when and by how much the counters went back.

Privacy and security

The widget calls one documented endpoint, GET https://c411.org/api/user/profile, with your key, every 30 minutes by default (C411 allows 30 requests a minute per key and refreshes the data every 30 seconds). The key never lands in shell.json or on a command line, and is never logged. The plugin reads no browser data. The history holds numbers only. The full details, including trust boundaries and limits, are in SECURITY.md.

Requires python3 and curl, both part of a stock Omarchy install.

Use

Action Effect
click open the panel
middle click poll now
right click open c411.org
u / r / d / x / z, j / k chart metric: upload, ratio, download, XP, Zen
1–4, h / l range: 24 h, 7 d, 30 d, all
R poll now
o open c411.org
f or / type a what-if target (Enter keeps it, Esc goes back)
k paste a new API key

IPC: omarchy-shell x99.c411trend refresh | status | forecast | samples | version, and omarchy-shell x99.c411trend when "10 TB" (or "ratio 5", "2000 zen") for a what-if from the command line.

Language

The panel, the bar label and the error messages come in US English and in French. Language (language) is Auto by default and follows your session locale: French when LANG starts with fr, English otherwise. Set it to English or Français to choose. The switch is live, no restart needed.

French uses the tracker's units and habits: 14,129 To, +98,4 Go/j, 18 420 XP, 12 nov. 2026, dans 3 semaines. In both languages sizes are binary multiples, like the tracker: 1 TB (1 To) is 1024⁴ bytes.

The same panel in French

Bar label

barFormat is a template, as in Dockarchy: each {key} is replaced by its value and everything else is kept, so you can compose several values with your own separators.

The bar pill with barFormat '↑{up} · {ratio}'

Key Value
{up} {down} {ratio} totals, as the site shows them (credit included)
{upreal} {downreal} the actual volumes, without credit
{credit} {downcredit} upload credit (bonus), download credit
{buffer} upload minus download
{rate} {downrate} daily upload / download pace
{up24h} {up7d} {up30d} upload gained over the last 24 h, 7 or 30 days
{down24h} {down7d} {down30d} same for download
{ratio24h} {ratio7d} {ratio30d} ratio change over the same windows
{next} {nexteta} next round upload figure and the time to get there
{goal} {ratiogoal} time to your upload / ratio goal (uploadTargetTo, ratioTarget): a duration, ✓ once there, ∞ if out of reach
{level} {xp} {xpnext} level, total XP, XP left to the next level
{leveleta} {xprate} time to the next level, XP per day
{zen} {zenrate} {zen7d} Zen balance, Zen earned per day, balance change over 7 days
{fl} {sl} FL while a freeleech is on, SL while silver leech is
{grade} {quests} class grade (Silver 2), quests done (23/40)
{team} {user} your team's tag, your C411 username

Aliases: {upload} {ul} = {up}, {download} {dl} = {down}, {bonus} = {credit}, {uprate} = {rate}. Keys are case-insensitive and may hold spaces ({ up }); {{ and }} print literal braces; an unknown key is left as typed so a typo shows. An empty template shows the icon alone.

omarchy bar set x99.c411trend barFormat '{ratio}'                     # 4.06
omarchy bar set x99.c411trend barFormat '↑{up} · {ratio}'              # ↑14.129 TB · 4.06
omarchy bar set x99.c411trend barFormat '{ratio} ({ratio7d})'          # 4.06 (+0.102)
omarchy bar set x99.c411trend barFormat '{up24h} today · {rate}'       # +131.6 GB today · +98.4 GB/day
omarchy bar set x99.c411trend barFormat '{next} in {nexteta}'          # 15.0 TB in 9 days
omarchy bar set x99.c411trend barFormat 'lvl {level} · {leveleta}'     # lvl 37 · 4 days
omarchy bar set x99.c411trend barFormat '{ratio} {fl}'                 # 4.06 FL
omarchy bar set x99.c411trend barFormat ''                             # icon only

Settings

From the shell settings, or omarchy bar set x99.c411trend <key> <value>:

Key Default
language Auto Auto, English or Français
refreshIntervalMin 30 minutes between polls
forecastWindowDays 14 days the pace is measured over
uploadTargetTo 0 upload goal always listed in the forecast, in TB
ratioTarget 0 ratio goal always listed in the forecast
defaultRange 30d 24h, 7d, 30d, all
barFormat {ratio} see Bar label
panelWidth 672 pixels

The API key is not a setting: it lives in its own private file, so it never ends up in a dotfiles repository with shell.json.

Data

History lives in ~/.local/state/c411trend/history.jsonl, one JSON object per line (t, up, down, ratio, credit, downCredit, xp, level, zen, zenEarned, optional "manual": true). Lines from 1.x, before the API key, lack the XP and Zen fields; their charts start with the first 2.0 reading. You can add older readings by hand. Polls only happen while you are logged in to your desktop, so the chart joins the points across the gaps. The file is compacted past 2 MiB and keeps full detail for 90 days.

Upgrading from 1.x

1.x read your c411.org session cookie from your browser; 2.0 uses an API key instead and reads no browser data. Create the key (see Install) and paste it in the panel: your history carries over. The browser and browserProfile settings are gone, and ~/.config/c411trend/cookie, if you had one, is no longer read: delete it.

Development

From a checkout of this repository in ~/Projects/C411Trend:

ln -s ~/Projects/C411Trend ~/.config/omarchy/plugins/x99.c411trend
omarchy bar put x99.c411trend

npm test                                       # node model tests + Python script tests
npm run check                                  # tests, marketplace baseline, omarchy plugin validate

npm run check expects the marketplace scanner in .marketplace/ (git-ignored; test/marketplace-baseline.mjs says how to get the commit CI pins).

The shell does not hot-reload files behind a symlinked plugin directory: run omarchy restart shell after editing the QML, then check omarchy-shell x99.c411trend version.

Screenshots use fictitious data only. docs/demo/photo-session.sh <dir> swaps in a made-up history (docs/demo/fake-history.py) and a stub fetch script, takes the English, French and bar shots, then restores your real history, fetch script and settings byte for byte, even if it fails halfway.

License

WTFPL.

About

C411 private tracker stats in the Omarchy bar: upload, download and ratio history, forecasts and a what-if calculator. English & French.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages