lavat/README.md

89 lines
3.4 KiB
Markdown
Raw Permalink Normal View History

2022-10-17 01:06:46 +00:00
# lavat
Little program that simulates a lava lamp in the terminal.
2022-10-30 01:07:31 +00:00
![demo](https://github.com/AngelJumbo/demos/blob/main/lavat/3.gif?raw=true)
2022-10-17 02:07:11 +00:00
## Installation
2022-10-17 01:06:46 +00:00
2022-10-17 16:41:09 +00:00
Requirements: A Unix-like system, a C compiler and make.
2022-10-17 07:21:49 +00:00
2022-10-17 02:07:11 +00:00
```
git clone https://github.com/AngelJumbo/lavat
cd lavat
2022-10-17 21:14:26 +00:00
make install
2022-10-17 02:07:11 +00:00
```
2022-10-17 09:13:39 +00:00
### Arch Linux
2022-10-17 12:20:49 +00: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 09:13:39 +00:00
```
$ paru -S lavat-git
```
2022-10-17 01:06:46 +00:00
## Usage
```
2022-10-18 03:53:24 +00:00
Usage: lavat [OPTIONS]
2022-10-17 01:06:46 +00:00
OPTIONS:
-c <COLOR> Set color. Available colours: red, blue, yellow, green, cyan, magenta, white and black.
2022-11-27 04:22:57 +00:00
-s <SPEED> Set the speed, from 1 to 10. (default 5)
2022-10-21 22:53:39 +00:00
-r <RADIUS> Set the radius of the metaballs, from 1 to 10. (default: 5)
-R <RIM> Set a rim for each metaball, sizes from 1 to 5.(default: none)
2023-01-14 14:39:46 +00:00
This option does not work with the default color
If you use Kitty or Alacritty you must use it with the -k option to see the rim.
-k <COLOR> Set the color of the rim if there is one. Available colours: red, blue, yellow, green, cyan, magenta, white and black.
2023-01-14 14:39:46 +00:00
-b <NBALLS> Set the number of metaballs in the simulation, from 5 to 20. (default: 10)
2022-10-21 22:53:39 +00:00
-F <CHARS> Allows for a custom set of chars to be used
2023-01-14 14:39:46 +00:00
Only ascii symbols are supported for now, wide/unicode chars may appear broken.
2022-10-21 22:53:39 +00:00
-C Retain the entire lava inside the terminal.
2022-10-21 22:56:21 +00:00
It may not work well with a lot of balls or with a bigger radius than the default one.
-p <MODE> PARTY!! THREE MODES AVAILABLE (p1, p2 and p3).
2022-10-21 22:53:39 +00:00
-h Print help.
2023-01-14 14:39:46 +00:00
RUNTIME CONTROLS:
i Increase radius of the metaballs.
2023-01-14 14:39:46 +00:00
d Decrease radius of the metaballs.
shift i Increase rim of the metaballs.
2023-01-14 14:39:46 +00:00
shift d Decrease rim of the metaballs.
m Increase the number of metaballs.
2023-01-14 14:39:46 +00:00
l Decrease the number metaballs.
c Change the color of the metaballs.
k Change the rim color of the metaballs.
+ Increase speed.
2023-01-14 14:39:46 +00:00
- Decrease speed.
p TURN ON THE PARTY AND CYCLE THROUGH THE PARTY MODES (it can also turns off the party).
(Tip: Zoom out in your terminal before running the program to get a better resolution of the lava).
2022-10-17 01:06:46 +00:00
```
2022-10-18 02:36:34 +00:00
2022-10-17 01:06:46 +00:00
## Demo
`lavat -p3`
![demo 1](https://github.com/AngelJumbo/demos/blob/main/lavat/6.gif?raw=true)
PARTY MODE!!!
2022-10-17 01:06:46 +00:00
`lavat -c red -R 1`
2022-10-17 01:10:00 +00:00
2022-10-30 01:07:31 +00:00
![demo 1](https://github.com/AngelJumbo/demos/blob/main/lavat/1.gif?raw=true)
2022-10-17 01:06:46 +00:00
`lavat -c cyan -R 4 -b 20 -r 2`
2022-10-30 01:07:31 +00:00
![demo 2](https://github.com/AngelJumbo/demos/blob/main/lavat/2.gif?raw=true)
2022-10-17 01:06:46 +00:00
2022-10-18 02:36:34 +00: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-18 02:36:34 +00:00
2022-10-30 01:07:31 +00:00
![demo 2](https://github.com/AngelJumbo/demos/blob/main/lavat/4.gif?raw=true)
2022-10-18 02:36:34 +00:00
2022-11-11 03:52:39 +00:00
For the Alacritty and Kitty users I know that the -R option haven't been working for you, but now you can set the color of the rim independently. Try:
2022-11-11 03:21:32 +00:00
`lavat -c yellow -R1 -k red`
![demo 2](https://github.com/AngelJumbo/demos/blob/main/lavat/5.gif?raw=true)
2022-10-18 02:58:59 +00:00
(The colors depend on your color scheme.)
2022-10-17 03:55:25 +00:00
2022-10-17 04:14:24 +00:00
## Credits
2022-10-17 01:06:46 +00:00
2022-10-17 16:33:34 +00:00
- This program is made with [Termbox2](https://github.com/termbox/termbox2).
2022-10-18 02:36:34 +00:00
- [Lava lamp in JavaScript](https://codeguppy.com/site/tutorials/lava-lamp.html)