Skip to content

Instantly share code, notes, and snippets.

@karanb192
Last active March 16, 2026 20:40
Show Gist options
  • Select an option

  • Save karanb192/48d2f410962cb311c6abfe428979731c to your computer and use it in GitHub Desktop.

Select an option

Save karanb192/48d2f410962cb311c6abfe428979731c to your computer and use it in GitHub Desktop.
Claude Code Status Line: 2x Off-Peak Promo Tracker (March 13-27, 2026)

Claude Code Status Line: 2x Off-Peak Promo Tracker

Claude is doubling usage limits during off-peak hours through March 27, 2026. But there's no indicator in Claude Code telling you when you're in 2x mode.

This status line config fixes that. It shows peak/off-peak status with a countdown timer, right in your Claude Code terminal.

What it looks like

🟒 OFF-PEAK (2x) ⏳ 3h42m left
πŸ”΄ PEAK (1x) ⏳ 47m until 2x

Setup (30 seconds)

Add the statusLine block from statusline.json to the top level of your ~/.claude/settings.json (alongside permissions, hooks, etc.).

That's it. No dependencies. Uses only /bin/date and /usr/bin/python3 (ships with every Mac).

Already using ccusage? Use statusline_with_ccusage.json instead. It combines the promo tracker with your existing burn rate display.

Peak hours

Peak = 8 AM - 2 PM ET on weekdays. Everything else is off-peak (2x).

Your timezone Peak in local time Full workday in 2x?
India (IST) 5:30 PM - 11:30 PM Yes
Japan (JST) 9 PM - 3 AM Yes
Australia (AEDT) 11 PM - 5 AM Yes
UK (GMT) 12 PM - 6 PM No (afternoon overlap)
US West (PDT) 5 AM - 11 AM No (morning overlap)
US East (EDT) 8 AM - 2 PM No (full overlap)

If you're in Asia or Oceania, your entire workday is already 2x. You might not have noticed.

How it works

  • Converts UTC to ET (hardcoded UTC-4 for EDT, which covers the full promo period)
  • Weekday + 8 AM-2 PM ET = peak. Everything else = off-peak
  • Shows countdown: during peak, time until off-peak. During off-peak, time until peak
  • After March 27: shows "Promo ended"

Built by @karanb192

"statusLine": {
"type": "command",
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | /usr/bin/python3 -c \"import sys,json; print(json.load(sys.stdin).get(\\\"model\\\",{}).get(\\\"display_name\\\",\\\"?\\\"))\"); PCT=$(echo \"$input\" | /usr/bin/python3 -c \"import sys,json; d=json.load(sys.stdin); print(int(float(d.get(\\\"context_window\\\",{}).get(\\\"used_percentage\\\",0))))\"); NOW=$(/bin/date -u +%s); END_TS=1774681140; DOW=$(/bin/date -u +%u); ET_H=$(/bin/date -u +%-H); ET_M=$(/bin/date -u +%-M); ET_H=$(( (ET_H - 4 + 24) % 24 )); G=\"\\033[32m\"; R=\"\\033[31m\"; RST=\"\\033[0m\"; if [ $NOW -gt $END_TS ]; then PROMO=\"Promo ended\"; elif [ $DOW -le 5 ] && [ $ET_H -ge 8 ] && [ $ET_H -lt 14 ]; then LEFT=$(( (14 - ET_H) * 60 - ET_M )); PROMO=\"${R}πŸ”΄ PEAK (1x)${RST} ⏳ 2x in ${LEFT}m\"; else if [ $DOW -le 5 ]; then if [ $ET_H -lt 8 ]; then LEFT=$(( (8 - ET_H) * 60 - ET_M )); elif [ $ET_H -ge 14 ]; then LEFT=$(( (24 - ET_H + 8) * 60 - ET_M )); fi; else if [ $DOW -eq 6 ]; then LEFT=$(( (24 - ET_H + 24 + 8) * 60 - ET_M )); else LEFT=$(( (24 - ET_H + 8) * 60 - ET_M )); fi; fi; HH=$((LEFT / 60)); MM=$((LEFT % 60)); PROMO=\"${G}🟒 OFF-PEAK (2x)${RST} ⏳ ${HH}h${MM}m left\"; fi; echo -e \"$PROMO | [$MODEL] ctx:${PCT}%\"'",
"padding": 0
}
"statusLine": {
"type": "command",
"command": "bash -c 'input=$(cat); CCUSAGE=$(echo \"$input\" | ccusage statusline --visual-burn-rate emoji); NOW=$(/bin/date -u +%s); END_TS=1774681140; DOW=$(/bin/date -u +%u); ET_H=$(/bin/date -u +%-H); ET_M=$(/bin/date -u +%-M); ET_H=$(( (ET_H - 4 + 24) % 24 )); G=\"\\033[32m\"; R=\"\\033[31m\"; RST=\"\\033[0m\"; if [ $NOW -gt $END_TS ]; then PROMO=\"Promo ended\"; elif [ $DOW -le 5 ] && [ $ET_H -ge 8 ] && [ $ET_H -lt 14 ]; then LEFT=$(( (14 - ET_H) * 60 - ET_M )); PROMO=\"${R}πŸ”΄ PEAK (1x)${RST} ⏳ 2x in ${LEFT}m\"; else if [ $DOW -le 5 ]; then if [ $ET_H -lt 8 ]; then LEFT=$(( (8 - ET_H) * 60 - ET_M )); elif [ $ET_H -ge 14 ]; then LEFT=$(( (24 - ET_H + 8) * 60 - ET_M )); fi; else if [ $DOW -eq 6 ]; then LEFT=$(( (24 - ET_H + 24 + 8) * 60 - ET_M )); else LEFT=$(( (24 - ET_H + 8) * 60 - ET_M )); fi; fi; HH=$((LEFT / 60)); MM=$((LEFT % 60)); PROMO=\"${G}🟒 OFF-PEAK (2x)${RST} ⏳ ${HH}h${MM}m left\"; fi; echo -e \"$PROMO | $CCUSAGE\"'",
"padding": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment