A Zellij plugin for enjoying the Conway's game of life.
s
startr
resetUp
andDown
orj
andk
to change the density of the random initial populationLeft
andRight
orh
andl
to change the time speed
Why not?
More seriously, it is actually quite fun to play around with the game of life to get a feel for the idea of emergence, as you play with different speeds and densities you will notice that certain configurations seem "noisy" while simply changing the speed will bring a certain beautiful order out of the noise.
You'll need rust installed.
git clone git@github.com:Nacho114/gol.git
cd gol
cargo build --release
mkdir -p ~/.config/zellij/plugins/
mv target/wasm32-wasi/release/gol.wasm ~/.config/zellij/plugins/
Add the following to your zellij config somewhere inside the keybinds section:
shared_except "locked" {
bind "Ctrl y" {
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/gol.wasm" {
floating true
}
}
}
You likely already have a
shared_except "locked"
section in your configs. Feel free to addbind
there.## Contributing
If you find any issues or want to suggest ideas please open an issue.
Make sure you have rust installed then run:
zellij action new-tab --layout ./dev.kdl
To run tests:
cargo test --target aarch64-apple-darwin -- --nocapture
Replace the target the appropriate cpu architecture.