gtk4-update-icon-cache(1)
๐ฆ gtk4-update-icon-cache โ icon theme caching utility
okay bestie, come sit with me, we're learning gtk4-update-icon-cache and it's from the GTK commands manual, part of GTK. Yes this is a real thing, yes it's kinda niche, and yes it's lowkey iconic once you get it. ๐
โจ SYNOPSIS โจ
gtk4-update-icon-cache [OPTIONS...] <PATH>
๐ธ DESCRIPTION ๐ธ
not me actually being obsessed with what this lil guy does. gtk4-update-icon-cache makes cache files for icon themes that can be used with mmap(2). periodt.
So the way that it works is: you hand it a PATH pointing at an icon theme directory that's got an index.theme in it โ think something like /usr/share/icons/hicolor โ and it writes out an icon-theme.cache stuffed full of cached info about all the icons living in the directory tree under that directory. ๐ โจ
and why do we care?? bestie because GTK can use the cache files that gtk4-update-icon-cache creates to avoid a LOT of system call and disk seek overhead when the application starts. that's a whole bunch of waiting, just โจgoneโจ.
and it gets better โ because the format of these cache files is designed to be shareable across multiple processes, for instance using the POSIX mmap(2) system call, the overall memory consumption goes down too. sharing is caring, fr fr. ๐ซถ
๐ OPTIONS ๐
-f,--forceโ overwrite a cache file that already exists, even if it's looking all up-to-date and smug about it. we love a fresh start. ๐-t,--ignore-theme-indexโ don't check whetherindex.themeexists in the icon theme directory. heads up tho: without this option,gtk4-update-icon-cachewill flat-out refuse to create an icon cache in a directory that doesn't look like it's the toplevel directory of an icon theme. so if you're being chaotic, this is your flag.-i,--index-onlyโ don't include image data in the cache. index only, minimal vibes, we're being efficient. ๐ง--include-image-dataโ include image data in the cache. it's giving full send. ๐-c,--source <NAME>โ output a C header file declaring a constant NAME with the contents of the icon cache. very coder of you, bestie. ๐-q,--quietโ turn OFF verbose output. shhh, no thoughts, just cache. ๐-v,--validateโ validate an existing icon cache. like a vibe check but for your cache file. ๐ฅ
๐ธ friendly lil reminder:-t/--ignore-theme-indexgenuinely changes whether the tool will touch a directory at all. noindex.theme+ no-t= no cache. that's not a bug, that's the boundary, and we respect it. โจ
made with ๐ by GTK, from the GTK commands manual โ paging gtk4-update-icon-cache(1) so your icons load fast and your memory stays cute. slay, go cache something. ๐๐ฆโญ
๐ฆ where this page comes from
- ubuntu stonking: gtk-update-icon-cache 4.24.1+ds-1 ยท LGPL-2.0-or-later AND LGPL-2.1-or-later AND sun-permissive AND lcs-telegraphics-permissive AND X11R5-permissive AND MIT AND BSD-3-clause-Google AND Apache-2.0 AND CC0-1.0 AND ZPL-2.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms