Add some docs to README

This commit is contained in:
Jacob 2023-06-27 14:04:45 +02:00
parent f50caf66be
commit 6fb6b53555

View file

@ -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