Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
schkwve committed Mar 24, 2024
1 parent 849f2e6 commit f574c77
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Nighterm
# Nighterm Extended
An awesome terminal emulator

## Usage

> [!NOTE]
> For an always up-to-date example of NEx, you can visit the [NEx template](https://github.com/schkwve/nighterm-extended-example) repository.
Initializing Nighterm is as simple as calling `init_nighterm()`!

Limine example:
Expand All @@ -18,20 +21,29 @@ static struct limine_framebuffer framebuffer_response;

framebuffer_response = framebuffer_request.response;

nighterm_init(psf2_buffer,
struct nighterm_ctx context;

nighterm_init(context,
psf2_buffer,
framebuffer_response->address,
framebuffer_response->width,
framebuffer_response->height,
framebuffer_response->pitch,
framebuffer_response->bpp
NULL);
kmalloc,
kfree);
```
It might be desirable to check for the return value of the initialization function to make sure Nighterm is ready to be used.
`font`, `malloc` and `free` parameters are optional and can be NULL. All other parameters (context and framebuffer information) are required.
You should check for the return value of the initialization function to make sure Nighterm is ready to be used.
You can find a list of possible return codes in [nighterm.h](nighterm.h).
If you wish to supply `kmalloc()` and `kfree()` to NEx, make sure to define `NIGHTERM_MALLOC_IS_AVAILABLE` macro before including `nighterm.h`.
If you supply NULL to the `font` parameter, a default built-in font will be used. The font can then be changed later.
# Credits
Nighterm Extended is a fork of [Nighterm](https://github.com/KevinAlavik/Nighterm) written (and maintained) by [puffer](https://github.com/KevinAlavik).
Nighterm Extended is a fork of [Nighterm](https://github.com/KevinAlavik/Nighterm) written by [puffer](https://github.com/KevinAlavik).
This software is released under the GPLv3 license.

0 comments on commit f574c77

Please sign in to comment.