wofi-config(3)
π wofi-config(3) π
okay bestie, welcome to the wofi-config(3) page from the Library Functions Manual β yes it's a manual page, no it's not boring, sit down, we're learning config functions together π«Ά
β¨ NAME β¨
wofi β Config functions and documentation π
πΈ DESCRIPTION πΈ
so like, the functions we're about to talk about? they're the ones you use to mess with maps that represent config entries. that's the whole vibe. they live in config.h β no cap, that's where they're defined. π
π CONFIG FUNCTIONS π
these are the functions you use to work with configs, and we're going through all of them, no skipping, periodt. π
void config_put(struct map* map, char* line)β parses a single config line and inserts the result into the map β¨struct map* mapβ the map you're inserting into, bestie.char* lineβ the config line you're inserting. it should be in the format ofkey=value, okay? that's the format. iykyk. π«
void config_load(struct map* map, const char* config)β loads a config file into the given map πstruct map* mapβ the map to load the config into.const char* configβ the path to a config file. it should contain lines with the format ofkey=value. π
char* config_get(struct map* config, const char* key, char* def_opt)β gets a config entry, and if the entry is not set then it returnsdef_opt. iconic behaviour honestly. πstruct map* configβ the map to get the value from.const char* keyβ the key to look up πchar* def_optβ the default value to be returned if the key does not exist. your little safety net, we love her. π«Ά
int config_get_mnemonic(struct map* config, const char* key, char* def_opt, int num_choices, ...)β gets an enum value from the config. if the value is not set then it returnsdef_opt. β¨struct map* configβ the map to get the value from.const char* keyβ the key to look up πchar* def_optβ the default value to be returned if the key does not exist.int num_choicesβ the number of enum options available, count them carefully bestie π’varargsβ the list of enum options available. yes, varargs. the little...is doing a lot of work here and we respect it. π
and that's the whole page!! every function, every parameter, every default β nothing got left behind, fr fr. π¦
mwah π β sent to you straight from the wofi-config(3) manual page, that's the source and the version, bestie. go slay some configs. πβ¨π
π¦ where this page comes from
- alpine 3.24: wofi-doc 1.5.3-r0 Β· GPL-3.0-only
- arch rolling: wofi 1.5.3-1 Β· GPL-3.0-or-later
- debian trixie: wofi 1.4.1-1+b2 Β· GPL-3.0-or-later
- fedora 43: wofi-devel 1.4.1-7.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.4.1-7.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.5.3-1.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.5.3-1.fc43 Β· GPL-3.0-only
- fedora 44: wofi-devel 1.5.3-2.fc44 Β· GPL-3.0-only
- fedora 44: wofi-devel 1.5.3-2.fc44 Β· GPL-3.0-only
- nixos 26.05: wofi 1.5.3
- nixpkgs unstable: wofi 1.5.3
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- ubuntu noble: wofi 1.4.1-1build2 Β· GPL-3.0-or-later
- ubuntu questing: wofi 1.4.1-1build2
- ubuntu resolute: wofi 1.5.1-1 Β· GPL-3.0-or-later
- ubuntu stonking: wofi 1.5.3-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms