Coins (ck-coins)
ck-coins (CkCoins X application class) tracks USD spot prices for selected cryptocurrencies via the public CoinGecko REST API and publishes the currently selected asset's symbol and live price onto its X11 desktop icon using anti-aliased Xft typography.
![]()
Main window and menus
- Coin list (left pane): Displays tracked coins with their latest formatted USD price (
bitcoinBTC,ethereumETH,tetherUSDT,binancecoinBNB, andsolanaSOL by default). Selecting any row updates both the right-hand detail summary and the desktop window icon immediately. - Detail summary (right pane): Reports
<Name> (<Symbol>), local check time and status (ok/fail), formatted USD price, and the upstreamlast_updated_attimestamp in local time. - Controls & menus:
- Refresh button: Triggers an immediate price check.
- File → New Window: Spawns an additional
ck-coinswindow (so multiple coins can be pinned as separate live desktop icons simultaneously). - File → Exit (
Alt+F4) / Close button: Saves session state and exits. - Help → About: Opens the standard tabbed About dialog.
Multi-instance cache and API behavior
To avoid rate-limiting when several ck-coins windows are open simultaneously:
- Endpoint: Queries
https://api.coingecko.com/api/v3/simple/priceover HTTPS vialibcurl(5 sconnect timeout,10 stotal timeout, gzip/deflate enabled) every 15 minutes. - Shared lock-protected cache: Stores responses under
$XDG_CACHE_HOME/ck-coins/(default~/.cache/ck-coins/) incache-<hash>.jsoncoordinated withflock()(LOCK_SH/LOCK_EX) and a900 s(15-minute) TTL.
Responsive Xft dynamic icon
ck-coins renders its WM_ICON_SIZE pixmap with Xft (Sans / DejaVu Sans) both while minimized and while open:
32×32: Compact two-row layout (<SYMBOL>/USDabove the price) so labels never overlap at small icon sizes.48×48,64×64, and96×96: Three-band layout (coin name top-left,USDmiddle-right, price bottom-right) with automatic font-size fitting; text renders in black after a successful refresh or muted gray (gray60) if the last fetch failed.
See High-resolution dynamic icons for all four icon sizes.
Command-line options, environment, and session state
CK_COINS_IDS="bitcoin,ethereum,cardano" ck-coins [-session <session_id>] [Xt options...]
| Setting | Purpose |
|---|---|
-session <id> | Restores CDE session geometry (x, y, w, h) and the selected coin row (selected_index). |
CK_COINS_IDS | Comma-separated CoinGecko asset IDs overriding the five built-in default coins. |
CK_COINS_DEBUG_ICON | Non-empty value logs Xft slot and font-fitting metrics to stdout. |
Notes and limitations
- Network requests execute synchronously via
curl_easy_performon the UI thread when the 15-minute disk cache has expired (bounded by the 10-secondlibcurltimeout).
CK Core Apps