Last active
July 3, 2026 14:39
-
-
Save ABIvan-Tech/1c979e29a378a67b88a313dfaee18464 to your computer and use it in GitHub Desktop.
Antigravity CLI custom status bar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Read JSON payload from stdin | |
| payload=$(cat) | |
| # Extract basic model information | |
| model=$(echo "$payload" | jq -r '.model.display_name // "N/A"') | |
| # Extract token usage data | |
| input=$(echo "$payload" | jq -r '.context_window.total_input_tokens // 0') | |
| output=$(echo "$payload" | jq -r '.context_window.total_output_tokens // 0') | |
| used_pct=$(echo "$payload" | jq -r '.context_window.used_percentage // 0 | round') | |
| # Extract remaining quotas for Gemini, convert to percentages, and round | |
| gem_5h=$(echo "$payload" | jq -r '.quota["gemini-5h"].remaining_fraction // 0 | (. * 100) | round') | |
| gem_wk=$(echo "$payload" | jq -r '.quota["gemini-weekly"].remaining_fraction // 0 | (. * 100) | round') | |
| # Extract remaining quotas for Claude/GPT (3p), convert to percentages, and round | |
| p3_5h=$(echo "$payload" | jq -r '.quota["3p-5h"].remaining_fraction // 0 | (. * 100) | round') | |
| p3_wk=$(echo "$payload" | jq -r '.quota["3p-weekly"].remaining_fraction // 0 | (. * 100) | round') | |
| # Build the final status bar string showing all limits | |
| echo "π€ ${model} | Context β ${input} (${used_pct}%) | Output β ${output} | Quota(5h/wk) Gemini: ${gem_5h}%/${gem_wk}% | Claude & GPT: ${p3_5h}%/${p3_wk}%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a bit streamlined version joined into one command