Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HermannBjorgvin/Clawdmeter
/ functions
Functions
503 in github.com/HermannBjorgvin/Clawdmeter
⨍
Functions
503
◇
Types & classes
23
↓ 34 callers
Function
log
(msg: str)
daemon/claude_usage_daemon.py:57
↓ 28 callers
Function
es8311_write_reg
firmware/src/es8311.c:146
↓ 22 callers
Function
log
(msg: str)
daemon/claude_usage_daemon_windows.py:96
↓ 19 callers
Function
_run
Run a coroutine synchronously for synchronous test functions.
daemon/tests/test_windows_reconnect.py:29
↓ 17 callers
Function
poll_api
(token: str)
daemon/claude_usage_daemon_windows.py:186
↓ 16 callers
Function
_run
Run a coroutine synchronously for synchronous test functions.
daemon/tests/test_windows_poll.py:35
↓ 15 callers
Function
_make_mock_response
Build a mock httpx.Response-like object with controllable headers.
daemon/tests/test_windows_poll.py:23
↓ 14 callers
Function
_make_device
Build a minimal fake BLEDevice.
daemon/tests/test_windows_reconnect.py:34
↓ 13 callers
Method
choose
Update state from this cycle's {dir: session_pct} and return the active dir.
daemon/claude_usage_daemon.py:486
↓ 13 callers
Function
connect_and_run
Connect to device and poll until disconnected or stopped. Returns True if at least one successful write occurred. `device` is a BLEDevice —
daemon/claude_usage_daemon_windows.py:511
↓ 12 callers
Function
_make_event
(set_)
daemon/tests/test_windows_reconnect.py:41
↓ 12 callers
Function
img_bytes
(img)
daemon/tests/test_windows_icon.py:96
↓ 10 callers
Function
es8311_read_reg
firmware/src/es8311.c:153
↓ 8 callers
Function
hdr
(name: str, default: str = "0")
daemon/claude_usage_daemon.py:389
↓ 8 callers
Function
hdr
(name: str, default: str = "0")
daemon/claude_usage_daemon_windows.py:206
↓ 8 callers
Function
read_token
Read the Claude OAuth access token from the first available credential file.
daemon/claude_usage_daemon_windows.py:455
↓ 7 callers
Function
_expand565
Expand a 16-bit RGB565 value to an (R, G, B) tuple using proper rounding. Uses ``(channel * 255 + max // 2) // max`` per channel, NOT a *8 bit-sh
daemon/icon_assets.py:36
↓ 7 callers
Function
_run
(coro)
daemon/tests/test_macos_multidir.py:16
↓ 6 callers
Function
_mac_from_pnp_instance_id
Recover a canonical BLE MAC ("AA:BB:CC:DD:EE:FF") from a PnP instance id. Windows encodes a paired BLE device's address in its PnP instance id as
daemon/claude_usage_daemon_windows.py:280
↓ 6 callers
Function
_make_winreg_mock
Return a configured MagicMock that stands in for the winreg module.
daemon/tests/test_windows_autostart.py:22
↓ 6 callers
Function
header_text
Return the D-05 menu status-header string for the current TrayState. Shapes: "Connected · last update HH:MM" (ts.last_sync is a float)
daemon/tray_windows.py:90
↓ 6 callers
Function
init_icon_dsc_rgb565a8
firmware/src/ui.cpp:258
↓ 6 callers
Function
load_logo_rgba
Parse the firmware logo.h C header and return an 80x80 Pillow RGBA Image. The logo.h layout (RGB565A8 planar, little-endian RGB565): - Firs
daemon/icon_assets.py:57
↓ 6 callers
Method
set_error
Called on token-expired / API auth failure (D-01 Error = actionable only).
daemon/tray_windows.py:80
↓ 5 callers
Function
_acquire_single_instance
Acquire the process-wide single-instance lock. Returns a truthy handle to keep alive for the process lifetime if this is the first/only tray,
daemon/tray_windows.py:123
↓ 5 callers
Function
_extract_access_token
Pull the accessToken out of a credentials blob. Claude Code stores credentials as a JSON object; the blob may also be nested ({"claudeAiOauth
daemon/claude_usage_daemon_windows.py:395
↓ 5 callers
Function
read_token_for
Read the OAuth token for one config dir. Linux: each dir keeps its own ``<dir>/.credentials.json``. macOS: the default install stores the tok
daemon/claude_usage_daemon.py:143
↓ 5 callers
Method
set_scanning
Called in scan/reconnect branches. BLE churn stays Scanning (D-01).
daemon/tray_windows.py:75
↓ 5 callers
Function
state_icon
Composite a colored corner bubble onto the brand mark for the given state. Args: base: The RGBA brand image (as returned by ``load_logo_
daemon/icon_assets.py:107
↓ 5 callers
Function
ui_show_screen
firmware/src/ui.cpp:647
↓ 4 callers
Function
_make_zombie_client
Build a mock BleakClient that connects successfully but has is_connected stuck True.
daemon/tests/test_windows_reconnect.py:162
↓ 4 callers
Function
apply_brightness
firmware/src/idle.cpp:22
↓ 4 callers
Function
begin_fade
firmware/src/idle.cpp:26
↓ 4 callers
Function
idle_consume_wake_press
firmware/src/idle.cpp:56
↓ 4 callers
Function
read_config_dirs
Claude config dirs to poll, from the `config_dirs` option (comma list). Defaults to [~/.claude] so existing single-plan setups are unchanged. ~ i
daemon/claude_usage_daemon.py:119
↓ 4 callers
Function
render_frame
firmware/src/splash.cpp:76
↓ 4 callers
Function
write_reg
firmware/src/boards/waveshare_amoled_18_c6/io_expander.cpp:22
↓ 4 callers
Function
write_reg
firmware/src/boards/waveshare_amoled_18/io_expander.cpp:20
↓ 3 callers
Function
_assert_clean
Assert that none of the FORBIDDEN patterns appear in the given source file. Reads the file relative to the repository root (the cwd pytest is inv
daemon/tests/test_windows_no_wsl.py:41
↓ 3 callers
Function
_fake_kernel32
Build a fake ctypes module tree whose CreateMutexW returns `handle` and whose get_last_error() returns `last_error`.
daemon/tests/test_windows_tray.py:231
↓ 3 callers
Function
_process_state_change
Mirror the relevant part of the _refresh loop body.
daemon/tests/test_windows_tray.py:195
↓ 3 callers
Function
_wait_first
Return when any of `events` is set, or after `timeout` seconds. Lets the poll loop's TICK wait wake immediately on a stop signal (clean, resp
daemon/claude_usage_daemon_windows.py:494
↓ 3 callers
Function
acquire_target
Return a connectable handle for the Clawdmeter, or None. Targets only the device bonded to THIS machine (via the PnP table / CLAWDMETER_BLE_A
daemon/claude_usage_daemon_windows.py:337
↓ 3 callers
Function
fetchText
(url)
tools/scrape_claudepix.js:25
↓ 3 callers
Function
pct
(util: str)
daemon/claude_usage_daemon.py:402
↓ 3 callers
Function
pct
(util: str)
daemon/claude_usage_daemon_windows.py:219
↓ 3 callers
Function
reset_minutes
(reset_ts: str)
daemon/claude_usage_daemon.py:394
↓ 3 callers
Function
reset_minutes
(reset_ts: str)
daemon/claude_usage_daemon_windows.py:211
↓ 3 callers
Method
set_connected
Called after write_payload returns True. ts = time.time().
daemon/tray_windows.py:69
↓ 3 callers
Function
splash_pick_for_current_rate
firmware/src/splash.cpp:258
↓ 3 callers
Function
usage_rate_group
firmware/src/usage_rate.cpp:61
↓ 3 callers
Method
write_payload
(self, payload: dict)
daemon/claude_usage_daemon.py:554
↓ 2 callers
Function
_blueutil
Run `blueutil <args>`, returning stdout, or None on failure/timeout. A timeout almost always means blueutil lacks Bluetooth permission (it bl
daemon/claude_usage_daemon.py:583
↓ 2 callers
Function
_connected_mock_client
()
daemon/tests/test_windows_reconnect.py:675
↓ 2 callers
Function
_extract_access_token
Pull the accessToken out of a credentials blob. Claude Code stores credentials as a JSON object; the blob may also be nested ({"claudeAiOauth
daemon/claude_usage_daemon.py:61
↓ 2 callers
Function
_next_backoff
D-05: double current backoff value, clamped to cap. Pure helper — unit-testable without driving the main loop. Used by both slow-search (cap=
daemon/claude_usage_daemon_windows.py:628
↓ 2 callers
Function
_ok
(p)
daemon/claude_usage_daemon.py:241
↓ 2 callers
Function
_read_expiry
Return human-readable expiry from the first-hit credentials file. Reads claudeAiOauth.expiresAt (epoch milliseconds — JS convention). Divides
daemon/claude_usage_daemon_windows.py:465
↓ 2 callers
Function
_run
(coro)
daemon/tests/test_windows_bonded.py:26
↓ 2 callers
Function
_windows_credential_candidates
Return the ordered list of credential file paths to probe (first hit wins). Priority: 1. CLAUDE_CREDENTIALS_PATH env override (D-03, project-
daemon/claude_usage_daemon_windows.py:430
↓ 2 callers
Function
_wrap
(p)
daemon/claude_usage_daemon.py:236
↓ 2 callers
Function
apply_battery_visibility
firmware/src/ui.cpp:635
↓ 2 callers
Function
ble_get_device_name
firmware/src/ble.cpp:330
↓ 2 callers
Function
ble_get_mac_address
firmware/src/ble.cpp:334
↓ 2 callers
Function
ble_get_state
firmware/src/ble.cpp:326
↓ 2 callers
Function
ble_keyboard_press
firmware/src/ble.cpp:384
↓ 2 callers
Function
ble_keyboard_release
firmware/src/ble.cpp:392
↓ 2 callers
Function
board_rev
firmware/src/boards/waveshare_amoled_18/board_init.cpp:12
↓ 2 callers
Function
build_state_icons
Build all three connection-state icons from the brand base image. Build them once at startup; swap ``icon.icon = icons[state]`` in the tray l
daemon/icon_assets.py:139
↓ 2 callers
Function
chime_init
firmware/src/chime.cpp:40
↓ 2 callers
Function
chime_play
firmware/src/chime.cpp:59
↓ 2 callers
Function
chime_tick
firmware/src/chime.cpp:66
↓ 2 callers
Function
claim_owner
firmware/src/ble.cpp:132
↓ 2 callers
Function
display_hal_set_brightness
firmware/src/boards/waveshare_amoled_216/display.cpp:36
↓ 2 callers
Function
es8311_resolution_config
firmware/src/es8311.c:261
↓ 2 callers
Function
es8311_sample_frequency_config
firmware/src/es8311.c:174
↓ 2 callers
Function
format_reset_time
firmware/src/ui.cpp:211
↓ 2 callers
Function
go
()
daemon/tests/test_windows_reconnect.py:651
↓ 2 callers
Function
idle_is_asleep
firmware/src/idle.cpp:74
↓ 2 callers
Function
idle_set_awake_brightness
firmware/src/idle.cpp:39
↓ 2 callers
Function
imu_hal_rotation_quadrant
firmware/src/boards/waveshare_amoled_216/imu.cpp:66
↓ 2 callers
Function
input_hal_is_held
firmware/src/boards/template/input.cpp:12
↓ 2 callers
Function
log
Log in the daemon [HH:MM:SS] style.
daemon/autostart_windows.py:33
↓ 2 callers
Function
make_usage_panel
firmware/src/ui.cpp:292
↓ 2 callers
Function
mini_render
firmware/src/splash.cpp:103
↓ 2 callers
Function
opt
(k, def)
tools/convert_to_c.js:16
↓ 2 callers
Function
opt
(k, def)
tools/scrape_claudepix.js:20
↓ 2 callers
Function
pct_color
firmware/src/ui.cpp:205
↓ 2 callers
Function
power_hal_battery_pct
firmware/src/boards/template/power.cpp:19
↓ 2 callers
Function
power_hal_is_charging
firmware/src/boards/template/power.cpp:20
↓ 2 callers
Function
power_hal_pwr_released
firmware/src/boards/template/power.cpp:26
↓ 2 callers
Function
prune_foreign_bonds
Delete every stored bond that isn't the owner, so the board stays paired to exactly one machine. Removing a bond shifts the indices, so restart from 0
firmware/src/ble.cpp:114
↓ 2 callers
Function
sound_hal_play_reset
firmware/src/boards/waveshare_amoled_18/sound.cpp:33
↓ 2 callers
Function
splash_get_root
firmware/src/splash.cpp:290
↓ 2 callers
Function
start_advertising
firmware/src/ble.cpp:141
↓ 2 callers
Function
ui_update_battery
firmware/src/ui.cpp:686
↓ 2 callers
Function
ui_update_ble_status
firmware/src/ui.cpp:676
↓ 2 callers
Function
update_view_state
Pick the usage-view sub-screen: pairing hint (BLE down), the idle "Zzz" screen (connected but data has gone stale), or the live usage panels. Only re-
firmware/src/ui.cpp:557
↓ 1 callers
Function
_billing_period_info
Fraction of billing period elapsed (tp, 0-100) and period length in days (pd). Billing periods are assumed calendar-monthly: period_end is the re
daemon/claude_usage_daemon.py:437
↓ 1 callers
Function
_billing_period_info
Fraction of billing period elapsed (tp, 0-100) and period length in days (pd). Monthly window is assumed (headers expose only reset_ts, not perio
daemon/claude_usage_daemon_windows.py:252
next →
1–100 of 503, ranked by callers