A calendar tui written in go.
| proto | ||
| .env | ||
| .envrc | ||
| .gitignore | ||
| constants.go | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| justfile | ||
| main.go | ||
| model.go | ||
| readme.md | ||
| styles.go | ||
| update.go | ||
| view.go | ||
GoCal
This is a terminal-based calendar and hourly schedule viewer built using Bubble Tea and styled with Lipgloss.
Project Structure
| File | Description |
|---|---|
main.go |
Entry point of the application. Initializes the program and sets the initial model state (current year/month and cursor position). |
constants.go |
Defines global constants such as calendar grid size and cell dimensions used throughout the app. |
styles.go |
Contains all the Lipgloss style definitions for calendar cells, headers, and hourly schedule views. |
model.go |
Defines the data model struct (model) that holds the application state, and the viewMode type representing current UI mode. Also contains the Init function for Bubble Tea. |
update.go |
Implements all update logic for handling user input and updating the model state in both month and hourly views. Includes the fix to properly update cursor position when switching months. |
view.go |
Contains all rendering logic that converts the current model state into styled terminal output for both month and hourly views. |
Usage
-
[a] / [d]: Navigate previous / next month.
-
Arrow keys: Move cursor around days.
-
[Enter]: Switch to hourly view for selected day.
-
[Esc]: Return to month view.
-
[q] / Ctrl+C: Quit.