Show a status line changedthird-party/claude-desktop/status-line
Nearest release: v2.1.314, published 2 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 30 Oct 2026 02:48 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 30 Oct 2026 18:07 UTC.
Upstream edited
Recorded here
Lines+48added
Lines−48removed
From line
86
where the diff opens
First seen
29 Oct 2026
this site's first read of the page
Recorded edits3to this page, all time
The whole hunk
from line 86, old and new numbered
/
from line 86
8686
8787Both samples print a budget line, `■■■■■■■■□□ 82% of $500 used this month`. The macOS and Linux sample reads its numbers from a file that your own scheduled job keeps up to date. The Windows sample prints fixed numbers and shows how a PowerShell script prints UTF-8, reads the input, and writes the escape character.
8888
89**macOS and Linux**
89> [tab] macOS and Linux
90>
91> ```sh theme={null}
92> #!/bin/sh
93> # Prints, for example: ■■■■■■■■□□ 82% of $500 used this month
94> # Your own scheduled job keeps this file up to date. It holds dollars used and
95> # the limit as two whole numbers, for example: 410 500
96> BUDGET_FILE=/opt/example/budget.txt
97>
98> # Unless the file holds two whole numbers, print nothing so no line shows.
99> [ -r "$BUDGET_FILE" ] || exit 0
100> read -r used limit < "$BUDGET_FILE"
101> case "$used" in ''|0?*|*[!0-9]*) exit 0 ;; esac
102> case "$limit" in ''|0*|*[!0-9]*) exit 0 ;; esac
103>
104> percent=$((used * 100 / limit))
105> if [ "$percent" -ge 90 ]; then color=31 # red
106> elif [ "$percent" -ge 70 ]; then color=33 # yellow
107> else color=32 # green
108> fi
109>
110> full="" empty=""
111> for step in 10 20 30 40 50 60 70 80 90 100; do
112> if [ "$percent" -ge "$step" ]; then full="${full}■"; else empty="${empty}□"; fi
113> done
114>
115> printf '\033[%sm%s\033[0m%s \033[%sm%s%%\033[0m of $%s used this month\n' \
116> "$color" "$full" "$empty" "$color" "$percent" "$limit"
117> ```
90118
91```sh theme={null}
92#!/bin/sh
93# Prints, for example: ■■■■■■■■□□ 82% of $500 used this month
94# Your own scheduled job keeps this file up to date. It holds dollars used and
95# the limit as two whole numbers, for example: 410 500
96BUDGET_FILE=/opt/example/budget.txt
97
98# Unless the file holds two whole numbers, print nothing so no line shows.
99[ -r "$BUDGET_FILE" ] || exit 0
100read -r used limit < "$BUDGET_FILE"
101case "$used" in ''|0?*|*[!0-9]*) exit 0 ;; esac
102case "$limit" in ''|0*|*[!0-9]*) exit 0 ;; esac
103
104percent=$((used * 100 / limit))
105if [ "$percent" -ge 90 ]; then color=31 # red
106elif [ "$percent" -ge 70 ]; then color=33 # yellow
107else color=32 # green
108fi
109
110full="" empty=""
111for step in 10 20 30 40 50 60 70 80 90 100; do
112 if [ "$percent" -ge "$step" ]; then full="${full}■"; else empty="${empty}□"; fi
113done
114
115printf '\033[%sm%s\033[0m%s \033[%sm%s%%\033[0m of $%s used this month\n' \
116 "$color" "$full" "$empty" "$color" "$percent" "$limit"
117```
118
119**Windows**
120
121```powershell theme={null}
122# Print UTF-8, so that characters outside ASCII show correctly.
123[Console]::OutputEncoding = New-Object Text.UTF8Encoding $false
124
125# Read the session data, one line of JSON. Use fields such as $session.model.display_name.
126$line = [Console]::In.ReadLine()
127$session = $line | ConvertFrom-Json
128
129# Fixed numbers keep the sample short. Replace them with your own budget data.
130$esc = [char]27
131$yellow = $esc + '[33m'
132$reset = $esc + '[0m'
133$full = ([string][char]0x25A0) * 8
134$empty = ([string][char]0x25A1) * 2
135$bar = $yellow + $full + $reset + $empty
136Write-Output ($bar + ' ' + $yellow + '82%' + $reset + ' of $500 used this month')
137```
119> [tab] Windows
120>
121> ```powershell theme={null}
122> # Print UTF-8, so that characters outside ASCII show correctly.
123> [Console]::OutputEncoding = New-Object Text.UTF8Encoding $false
124>
125> # Read the session data, one line of JSON. Use fields such as $session.model.display_name.
126> $line = [Console]::In.ReadLine()
127> $session = $line | ConvertFrom-Json
128>
129> # Fixed numbers keep the sample short. Replace them with your own budget data.
130> $esc = [char]27
131> $yellow = $esc + '[33m'
132> $reset = $esc + '[0m'
133> $full = ([string][char]0x25A0) * 8
134> $empty = ([string][char]0x25A1) * 2
135> $bar = $yellow + $full + $reset + $empty
136> Write-Output ($bar + ' ' + $yellow + '82%' + $reset + ' of $500 used this month')
137> ```
138138
139139## When the status line updates
140140
No line in this hunk matches that.