From 6fb6b53555e1e42692d77c724346c5823d87b67b Mon Sep 17 00:00:00 2001 From: speedie Date: Tue, 27 Jun 2023 14:04:45 +0200 Subject: [PATCH] Add some docs to README --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 18ca7ed..a7790b7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,64 @@ # neosfetch -Minimal user-centric fetch script, successor to sfetch +neosfetch is a minimal user-centric fetch script and the successor to sfetch. +Unlike most fetch scripts out there, the fetch script itself is very small but +easily extensible. -# License +## How does it work? + +Modules and ASCII art can be added by simply adding them to +the config file created after running it for the first time. + +The config file is essential. Core features of the script are +contained in the config file. This was done on purpose, because +it allows the user greater control over how everything functions. + +This allows neosfetch to come bundled with few functions and support +for fewer operating systems, because users can just add support for +what they use. This increases speed, and reduces code that you will +never need to use. + +## Built in modules + +neosfetch has a few built in modules that can be used in the `ns_pf` +function. These are: + +- `d_user`: Print the current user +- `d_hostname`: Print the hostname +- `d_tram`: Print the RAM capacity in (by default) megabytes +- `d_fram`: Print the amount of free RAM in (by default) megabytes +- `d_uram`: Print the amount of used RAM in (by default) megabytes +- `d_kernel`: Print the kernel used (usually but not always 'Linux') +- `d_kernelv`: Print the kernel version +- `d_cpu_model`: Print the CPU model +- `d_cores`: Print the number of cores +- `d_threads`: Print the number of threads + +The default config file also provides: + +- `d_pkgc`: Print the package count +- `d_dist`: Print the distro + +Example: Display the user, hostname, distro, kernel version, cpu model and used RAM + +``` +ns_pf() { +p "$(d_user)@$(d_hostname)" +p "" +p "Distro: $(d_dist)" +p "Kernel: $(d_kernel) $(d_kernelv)" +p "CPU: $(d_cpu_model)" +p "Used RAM: $(d_uram)" +a +} +``` + +## Art + +Currently neosfetch has no built in ASCII art. To add some, set the `$art` variable +based on the value of `$dist` in the `rs` function in your config. + +## License Copyright (C) 2023 speedie