[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81929":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":12,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":9,"pushedAt":9,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":24,"discoverSource":25},81929,"fetchlains","Linuxdrito\u002Ffetchlains","Linuxdrito","El fastfetch con los gifs de lain",null,"C",28,1,26,0,2,0.9,false,"main",true,[],"2026-06-12 02:04:21","# fetchlains\n\n> fastfetch + lain gifs for my Hyprland setup.\n\nThe original zsh script worked fine, but I wanted to eliminate shell overhead and take advantage of the fact that `fastfetch` and GIF selection can run in parallel..\n\n\n\u003Cimg width=\"400\" height=\"400\" alt=\"lain10\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F72a2b08c-8a43-4a29-adab-cef65cdfd683\" \u002F> \u003Cimg width=\"400\" height=\"400\" alt=\"lain1\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F712ae26b-090b-4d03-acb2-0d0a346b5988\" \u002F>\n\n\n\n\n---\n\n## What it does\n\n1. **Immediate fork** — launches `fastfetch` in the background, redirecting its output to a tmpfile, without waiting.\n2. **In parallel** — reads `~\u002F.gif-index` and picks a random GIF with its precomputed dimensions.\n3. **Sync** — waits for `fastfetch`, clears the screen, dumps the output.\n4. **Terminal detection** — checks `$KITTY_WINDOW_ID`, `$TERM`, `$TERM_PROGRAM` and picks `kitty` or `sixel` protocol. Defaults to `kitty` (GPU accelerated).\n5. **`execlp` timg** — replaces the process itself with `timg` (no extra fork, no zombie process). Animated GIF with `--loops 0`. Press `q` to quit and free resources.\n\n---\n\n## Files\n\n```\nfetchlains.c        — source\nfetchlains.sh       — original zsh script (reference)\ngif-index      — GIF index with precomputed dimensions → copy to ~\u002F.gif-index\nmargin.txt     — fastfetch logo → copy to ~\u002Fmargin.txt\n\n```\n\n---\n\n## Dependencies\n\n```sh\nfastfetch timg gcc\n```\n\n---\n\n## Setup\n\n```sh\n# 1. Place the index\nmkdir ~\u002FDescargas && cp -r ~\u002Ffetchlains\u002Fgifs ~\u002FDescargas\u002F\n\n# 2. Place the index\ncp gif-index ~\u002F.gif-index\n\n# 3. Place the logo\ncp margin.txt ~\u002Fmargin.txt\n\n# 4. Compile\ngcc -O2 -march=native -flto -pipe -s -o fetchlains fetchlains.c\n\n# 5. Install\nsudo mv fetchlains \u002Fusr\u002Flocal\u002Fbin\u002Ffetchlains\n```\n\n---\n\n## gif-index\n\nFormat: `name.gif:width:height`. One GIF per line, no spaces.\n\n```\nlain-gift.gif:36:36\nlain8.gif:33:33\nlain9.gif:37:37\nlain1.gif:35:35\nlain10.gif:35:35\nlain2.gif:35:35\nlain4.gif:35:35\nlain5.gif:35:35\n```\n\nGIFs live in `~\u002FDescargas\u002Fgifs\u002F`. To add a new one just append a line to the index — no recompilation needed.\n\n---\n\n## Hyprland integration\n\nIn `hyprland.conf`:\n\n```ini\nbind = $mainMod, H, exec, footclient fetchlains\n```\n\n---\n\n## Why not the zsh script\n\n| | `fetchlains.sh` | `fetchlains` (C) |\n|---|---|---|\n| Startup overhead | ~15ms (zsh) | ~1ms |\n| fastfetch + GIF selection | Sequential | **Parallel** |\n| Launching timg | fork + exec | `execlp` (replaces the process) |\n| GIF dimensions | `case` at runtime | Read from index |\n| Terminal protocol | `sixel` hardcoded | Auto-detected (`kitty`\u002F`sixel`) |\n| Quit | Ctrl+C | `q` |\n","fetchlains 是一个结合了 fastfetch 和 Lain GIF 的系统信息展示工具。该项目通过 C 语言编写，能够并行执行 fastfetch 和 GIF 选择，从而减少启动时间和资源占用。核心功能包括立即后台运行 fastfetch、并行读取和随机选择 GIF、同步等待 fastfetch 完成后清屏输出结果、自动检测终端协议（默认使用 GPU 加速的 kitty 协议），以及通过 `execlp` 替换进程来避免僵尸进程。适用于希望在 Hyprland 或其他桌面环境中以美观且高效的方式显示系统信息的用户。","2026-06-11 04:07:14","CREATED_QUERY"]