Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌧️ Gorain 🌧️

gorain_opt

English | Русский

English

Gorain is a small terminal animation written in Go. It draws falling rain drops directly in the terminal using tcell, with randomized drop positions, speed, length, symbols, and color intensity.

Features

  • Smooth terminal rendering with tcell
  • Randomized rain drops for a natural-looking animation
  • Automatic redraw on terminal resize
  • Graceful exit with Esc or Ctrl+C
  • Simple file logging to log.log

Requirements

  • Go 1.26 or newer
  • A terminal with support for ANSI-style rendering

Getting Started

Clone the repository and run the app:

git clone https://github.com/talismanch1k/gorain.git
cd gorain
go run .

To build a binary:

go build -o gorain .
./gorain

Controls

Key Action
Esc Exit the application
Ctrl+C Exit the application

Project Structure

.
├── main.go                  # Application entry point
├── internal/
│   ├── app/                 # Terminal screen rendering and rain drop logic
│   ├── closer/              # Small helpers for closing resources
│   └── logger/              # slog setup and file logging
├── go.mod
├── go.sum
└── LICENSE

Logging

Gorain writes runtime logs to log.log in the current working directory. The file is created automatically if it does not exist.

Future plans

  • Change drawing speed based on monitor frequency
  • Add options for configuration

License

This project is distributed under the MIT License. See LICENSE for details.

Русский

Gorain - небольшая терминальная анимация дождя, написанная на Go. Приложение рисует капли прямо в терминале с помощью tcell: у каждой капли случайные позиция, скорость, длина, символ и интенсивность цвета.

Возможности

  • плавная отрисовка в терминале через tcell;
  • случайная генерация капель для более живой анимации;
  • корректная перерисовка при изменении размера окна;
  • выход по Esc или Ctrl+C;
  • простое логирование в файл log.log.

Требования

  • Go 1.26 или новее;
  • терминал с поддержкой ANSI-отрисовки.

Запуск

Склонируйте репозиторий и запустите приложение:

git clone https://github.com/talismanch1k/gorain.git
cd gorain
go run .

Чтобы собрать исполняемый файл:

go build -o gorain .
./gorain

Управление

Клавиша Действие
Esc выйти из приложения
Ctrl+C выйти из приложения

Структура проекта

.
├── main.go                  # точка входа
├── internal/
│   ├── app/                 # отрисовка экрана и логика капель
│   ├── closer/              # вспомогательные функции закрытия ресурсов
│   └── logger/              # настройка slog и файлового логирования
├── go.mod
├── go.sum
└── LICENSE

Логирование

Во время работы Gorain пишет служебные сообщения в log.log в текущей директории. Если файла нет, он будет создан автоматически.

Планы

  • менять скорость отрисовки с учетом частоты обновления монитора;
  • добавить параметры конфигурации.

Лицензия

Проект распространяется под лицензией MIT. Подробнее см. в LICENSE.

About

Simple CLI (TUI) rain app written in go

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages