3.2 kB 49 lines
7e68a437
⋯
apps/tiles/CLAUDE.md
download raw history
at main Markdown

c8-tiles #

Tile maker: your own Start tiles (any command, icon, colour, size, a picture filling it), and a Games page (Steam, Lutris, Game desktop entries) with art from SteamGridDB. Depends on: c8ui, gio, gdk-pixbuf, curl (run time).

org.cont8nuum.TileMaker, binary c8-tiles, one copy (c8ui_app_main), c8ui_pages (pages My tiles, Games, Settings; the editor is a sub page over them, back/Escape; editor_left drops an empty new tile; one at a time under 760 px, c8ui_pages' own fold: the app doesn't watch the size). Tiles go to Start as the app's own secondary tiles through RequestPin (Start asks; the shell's request_pin also restyles an already pinned secondary tile with the same exec without asking, so face changes are pushed as they're made, 700 ms after the last; a changed command needs "Update on Start", which asks again). Start draws image/wide_image (start.ini keys, new) cover -fit instead of the colour and icon (tile_picture/tile_restyle in tiles.c), with a dark gradient under the name. store.c: the tiles in ~/.config/cont8nuum/tilemaker.ini (0600: it also holds the SteamGridDB key, [steamgriddb] key; STEAMGRIDDB_API_KEY wins), pinned_exec = the command Start has; pictures are copied into ~/.local/share/cont8nuum/tilemaker/ under a new name each time (so Start loads them again), unreferenced ones pruned after a pin or a delete. games.c: Steam (libraryfolders.vdf + appmanifest_*.acf in the native, ~/.steam and Flatpak roots; Proton/runtimes skipped; exec steam steam://rungameid/ID; its librarycache header as the wide picture), Lutris (lutris -l -j; lutris lutris:rungameid/ID, its banner and icon), then desktop entries with Category Game (launchers skipped, steam://rungameid ones count as Steam). sgdb.c: API v2 with a bearer key: /games/steam/APPID or /search/autocomplete/NAME, the first hit taken (others offered as links), then wide grids (460x215/920x430), square (512/1024) and icons, PNG/JPEG only (Start has no WebP loader); picking one downloads it as the tile's picture. picture.c decodes thumbnails on a thread (cached under ~/.cache/cont8nuum/tilemaker/). --page tiles|games|settings, --edit TILE-ID. Tested headless, wide and at 480: every page, the editor, a Steam library, the restyle over the bus and Start drawing the picture, a refused key's message. Untested: art with a real key, the pin question answered by hand, the file picker, Lutris and desktop games. Headless gotcha: an app started with c8 -s before the shell has no keyboard focus until Super is pressed twice. Stealth mode (stealth.h, c8-base): the editor's Command and Icon boxes (path_entry) show the stand-in for the login's home when they hold it, greyed and not editable (with a line saying why), since typing into a stand-in would save it as the real command; "Start from an app" and "Choose an icon…" still work. The watch rebuilds the editor. The SteamGridDB key is dots on the Settings page and in the Settings charm's Options (always, not only in stealth mode). Tested headless: the boxes on, off and flipped live, tilemaker.ini unchanged. Untested: the charm's key box.