Skip to content

Commit 1d8ec6c

Browse files
authored
Merge pull request #6 from usamaiqb/feature/tray-icon
- Added a native system tray icon with a live usage badge for the current 5-hour window. - Left-clicking the tray icon now toggles the taskbar widget on and off. - Right-click tray menu support now mirrors the widget menu, including refresh, startup, position reset, language, updates, and exit. - The app now remembers whether the taskbar widget was hidden or visible between launches. - Improved Windows app identity by using the proper app name and embedded icon metadata in shell surfaces. - Refined tray icon styling and usage-state colouring for clearer at-a-glance monitoring.
2 parents ba84737 + d52bfea commit 1d8ec6c

File tree

9 files changed

+479
-11
lines changed

9 files changed

+479
-11
lines changed

.github/animation.gif

93.2 KB
Loading

.github/screenshot.png

-12 KB
Binary file not shown.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[package]
22
name = "claude-code-usage-monitor"
3-
version = "1.2.10"
3+
version = "1.2.11"
44
edition = "2021"
55
license = "MIT"
6-
description = "Windows taskbar widget for monitoring Claude Code usage and rate limits"
6+
description = "Claude Code Usage Monitor"
77
homepage = "https://codezeno.com.au"
88
repository = "https://github.com/CodeZeno/Claude-Code-Usage-Monitor"
99

1010
[package.metadata.winres]
1111
CompanyName = "Code Zeno Pty Ltd"
1212
ProductName = "Claude Code Usage Monitor"
13-
FileDescription = "Windows taskbar widget for monitoring Claude Code usage and rate limits"
13+
FileDescription = "Claude Code Usage Monitor"
1414
OriginalFilename = "claude-code-usage-monitor.exe"
1515
InternalName = "ClaudeCodeUsageMonitor"
1616
Comments = "https://codezeno.com.au"

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ It sits in your taskbar and shows how much of your Claude Code usage window you
77
![Windows](https://img.shields.io/badge/platform-Windows-blue)
88
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
99

10-
![Screenshot](.github/screenshot.png)
10+
![Screenshot](.github/animation.gif)
1111

1212
## What You Get
1313

1414
- A **5h** bar for your current 5-hour Claude usage window
1515
- A **7d** bar for your current 7-day window
1616
- A live countdown until each limit resets
1717
- A small native widget that lives directly in the Windows taskbar
18+
- A **system tray icon** showing your usage percentage as a color-coded badge
19+
- Left-click the tray icon to toggle the taskbar widget on or off
1820
- Right-click options for refresh, update frequency, language, startup, and updates
1921

2022
## Who This Is For
@@ -48,12 +50,27 @@ After installing with WinGet, run:
4850
claude-code-usage-monitor
4951
```
5052

51-
Once running, it will appear in your taskbar.
53+
Once running, it will appear in your taskbar and as a tray icon in the notification area.
5254

53-
- Drag the left divider to move it
54-
- Right-click for refresh, update frequency, Start with Windows, reset position, language, updates, and exit
55+
- Drag the left divider to move the taskbar widget
56+
- Right-click the taskbar widget or tray icon for refresh, update frequency, Start with Windows, reset position, language, updates, and exit
57+
- Left-click the tray icon to toggle the taskbar widget on or off
5558
- Enable `Start with Windows` from the right-click menu if you want it to launch automatically when you sign in
5659

60+
### System Tray Icon
61+
62+
The tray icon shows your current 5-hour usage as a color-coded percentage badge:
63+
64+
| Color | Meaning |
65+
|--------|-------------------|
66+
| Green | Under 50% used |
67+
| Yellow | 50–75% used |
68+
| Orange | 75–90% used |
69+
| Red | 90% or more used |
70+
| Gray | No data available |
71+
72+
Hovering over the tray icon shows a tooltip with both your 5h and 7d usage.
73+
5774
## Diagnostics
5875

5976
If you need to troubleshoot startup or visibility issues, run:

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mod models;
66
mod native_interop;
77
mod poller;
88
mod theme;
9+
mod tray_icon;
910
mod updater;
1011
mod window;
1112

src/native_interop.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub const TIMER_UPDATE_CHECK: usize = 4;
2222
// Custom messages
2323
pub const WM_APP: u32 = 0x8000;
2424
pub const WM_APP_USAGE_UPDATED: u32 = WM_APP + 1;
25+
pub const WM_APP_TRAY: u32 = WM_APP + 3;
2526

2627
/// Get the taskbar window handle
2728
pub fn find_taskbar() -> Option<HWND> {

0 commit comments

Comments
 (0)