- Zig 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .gitignore | ||
| App.zig | ||
| build.zig | ||
| build.zig.zon | ||
| Display.zig | ||
| Logo.zig | ||
| Module.zig | ||
| README.md | ||
| root.zig | ||
kosm_fastfetch
fastfetch for kosm: its whole config, owned by kosm.
fastfetch can't include another config file, so the app writes all of
~/.config/fastfetch/config.jsonc: the logo, how lines look and which modules show. Lay
fastfetch out in your kosmos instead of in that file; an apply replaces it. Field names are
fastfetch's in Zig casing (padding_left is written paddingLeft, command_raw is
command-raw), and every field left null is not written, so fastfetch's default applies.
from(theme) sets the colors from the theme's roles: keys and the title the accent, values the
foreground, the separator and a bar's rest and border muted, a bar's used part the accent,
percentages and temperatures success, warning and error, and the logo's colors 1 and 2 the
accent and the secondary.
var fastfetch = kosm_fastfetch.from(theme);
fastfetch.logo = .{ .type = .command_raw, .source = "sh ~/.config/fastfetch/logo.sh" };
fastfetch.display.key = .{ .width = 8, .type = .icon };
fastfetch.modules = &.{
.{ .type = .title },
.{ .type = .os, .format = "{2}" },
.{ .type = .disk, .format = "{1} / {2}", .extra = &.{.{ .path = "folders", .value = .{ .string = "/" } }} },
};
Fields
| Field | Default |
|---|---|
file |
~/.config/fastfetch/config.jsonc |
logo |
type, source, color (nine colors, $1 .. $9), padding (top, bottom, left, right), width, height; null leaves each to fastfetch |
display |
separator; color (keys, title, output, separator); key (width, type, padding_left); bar (width, char, color); percent (type, color); temp (color) |
modules |
fastfetch's own list (Module.defaults); each type, key, format, key_color, output_color, extra; one with only type is written as its name |
extra |
none; settings the fields don't cover, by path (display.size.binaryPrefix) |