mirror of
https://github.com/tiennm99/claude-code-usage-bubble.git
synced 2026-10-13 12:14:19 +00:00
feat: initial port of claude-code-usage-monitor as a floating bubble
Windows-only floating, draggable circular bubble showing Claude Code and Codex usage. Derivative of CodeZeno/Claude-Code-Usage-Monitor (MIT), relicensed under Apache 2.0 with upstream attribution in NOTICE. - Ported verbatim: poller, updater, tray_icon, theme, localization, diagnose, models (~2,700 LOC) - Original: bubble (circular layered window, drag-anywhere via WM_NCHITTEST+HTCAPTION, snap-to-edge, Ctrl+Wheel resize, auto-hide on fullscreen), panel (expanded 5h/7d view), app (orchestrator, single-instance mutex, polling thread, context menu, dual-bubble lifecycle), settings (settings.json persistence) - Cargo.toml features cover Win32 GDI, HiDpi, Registry, Threading, Shell, WindowsAndMessaging, and KeyboardAndMouse
This commit is contained in:
commit
c0f3e3f860
42 files changed
+7046
No files matched your search
+39
@@ -0,0 +1,39 @@
|
||||
#![windows_subsystem = "windows"]
|
||||
|
||||
mod app;
|
||||
mod bubble;
|
||||
mod diagnose;
|
||||
mod localization;
|
||||
mod models;
|
||||
mod native_interop;
|
||||
mod panel;
|
||||
mod poller;
|
||||
mod settings;
|
||||
mod theme;
|
||||
mod tray_icon;
|
||||
mod updater;
|
||||
|
||||
fn main() {
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
let diagnose_enabled = args.iter().any(|a| a == "--diagnose");
|
||||
if diagnose_enabled {
|
||||
if let Ok(path) = diagnose::init() {
|
||||
diagnose::log(format!(
|
||||
"startup args={args:?} log_path={}",
|
||||
path.display()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(exit_code) = updater::handle_cli_mode(&args) {
|
||||
if diagnose_enabled {
|
||||
diagnose::log(format!("cli mode exited with code {exit_code}"));
|
||||
}
|
||||
std::process::exit(exit_code);
|
||||
}
|
||||
|
||||
if diagnose_enabled {
|
||||
diagnose::log("entering app::run");
|
||||
}
|
||||
app::run();
|
||||
}
|
||||
Reference in new issue
Block a user