lavat/README.md

60 lines
1.9 KiB
Markdown
Raw Normal View History

2022-10-16 18:06:46 -07:00
# lavat
Little program that simulates a lava lamp in the terminal.
2022-10-17 19:51:50 -07:00
![demo](https://github.com/AngelJumbo/lavat/blob/demo/demo/3.gif?raw=true)
2022-10-16 19:07:11 -07:00
## Installation
2022-10-16 18:06:46 -07:00
2022-10-17 09:41:09 -07:00
Requirements: A Unix-like system, a C compiler and make.
2022-10-17 00:21:49 -07:00
2022-10-16 19:07:11 -07:00
```
git clone https://github.com/AngelJumbo/lavat
cd lavat
2022-10-17 14:14:26 -07:00
make install
2022-10-16 19:07:11 -07:00
```
2022-10-17 02:13:39 -07:00
### Arch Linux
2022-10-17 05:20:49 -07:00
Lavat is also available on the AUR [here](https://aur.archlinux.org/packages/lavat-git). Install it with your favourite AUR-helper or manually.
2022-10-17 02:13:39 -07:00
```
$ paru -S lavat-git
```
2022-10-16 18:06:46 -07:00
## Usage
```
2022-10-17 20:53:24 -07:00
Usage: lavat [OPTIONS]
2022-10-16 18:06:46 -07:00
OPTIONS:
-c COLOR Set color. Available colours: red, blue, yellow, green, cyan and magenta.
Besides those colors the default one is the normal foreground of your terminal.
-s SPEED Set the speed, from 1 to 5. (default 1)
-r RADIUS Set the radius of the metaballs, from 1 to 10. (default: 5)
2022-10-17 19:36:34 -07:00
-R RIM Set a "rim" for each metaball, sizes from 1 to 5. (default: none)
2022-10-16 18:06:46 -07:00
This option does not work with the default color
-b NBALLS Set the number of metaballs in the simulation, from 2 to 20. (default: 10)
2022-10-17 19:36:34 -07:00
-F CHARS Allows for a custom set of chars to be used
2022-10-16 18:06:46 -07:00
-h Print help.
```
2022-10-17 19:36:34 -07:00
2022-10-16 18:06:46 -07:00
## Demo
`lavat -c red -R 1`
2022-10-16 18:10:00 -07:00
2022-10-17 19:51:50 -07:00
![demo 1](https://github.com/AngelJumbo/lavat/blob/demo/demo/1.gif?raw=true)
2022-10-16 18:06:46 -07:00
`lavat -c cyan -R 4 -b 20 -r 2`
2022-10-17 19:51:50 -07:00
![demo 2](https://github.com/AngelJumbo/lavat/blob/demo/demo/2.gif?raw=true)
2022-10-16 18:06:46 -07:00
2022-10-17 19:36:34 -07:00
If you send more than one character to the -F option you can have 3d-ish effect.
`lavat -c blue -R2 -F @@:::::: -r10`
2022-10-17 19:36:34 -07:00
2022-10-17 19:51:50 -07:00
![demo 2](https://github.com/AngelJumbo/lavat/blob/demo/demo/4.gif?raw=true)
2022-10-17 19:36:34 -07:00
2022-10-17 19:58:59 -07:00
(The colors depend on your color scheme.)
2022-10-16 20:55:25 -07:00
2022-10-16 21:14:24 -07:00
## Credits
2022-10-16 18:06:46 -07:00
2022-10-17 09:33:34 -07:00
- This program is made with [Termbox2](https://github.com/termbox/termbox2).
2022-10-16 18:06:46 -07:00
- [Metaballs](https://en.wikipedia.org/wiki/Metaballs).
2022-10-17 19:36:34 -07:00
- [Lava lamp in JavaScript](https://codeguppy.com/site/tutorials/lava-lamp.html)