Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
● <a href="#keybindings">Keybindings</a> ● <a href="#command-line-options">Command Line Options</a> ● <a href="#credit-where-credit-is-due">Credits</a> ● <a href="#license">License</a>
</div>

<br>

![Demo Animation](docs/demo.webp)

## Features

- **Pomodoro Timer:** Focus sessions with short and long breaks to maximize productivity
Expand All @@ -17,8 +21,6 @@
- **Session Alarms:** Optional alarm sounds for session transitions
- **Lightweight & Fast:** Written in Rust for optimal performance

<img width="1920" height="1200" alt="image" src="https://github.com/user-attachments/assets/29380a2e-6508-4f85-ad1c-f1d78a226be3" />

## Installation

### Pre-compiled Binary (Recommended)
Expand Down
31 changes: 31 additions & 0 deletions dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Commands:
lint - Run linter with "cargo clippy --all-targets --all-features --fix --allow-dirty"
test - Run tests with "cargo test --all-features"
docs - Compile Mermaid diagrams to images
demo - Build release, alias, and run vhs demo tape
all - Run format, lint, and test in sequence
help - Show this help message

Expand All @@ -51,6 +52,7 @@ Examples:
./dev.sh lint # Run linter
./dev.sh test # Run tests
./dev.sh docs # Compile Mermaid diagrams
./dev.sh demo # Build release, alias, and run demo tape
./dev.sh format lint # Format then lint
./dev.sh all # Run format, lint, and test

Expand Down Expand Up @@ -102,6 +104,32 @@ cmd_docs() {
print_success "Mermaid diagrams compiled to docs/diagrams/"
}

cmd_demo() {
print_info "Building release binary..."
cargo build --release
print_success "Release build completed"

print_info "Creating wrapper script..."
local wrapper_dir="/tmp/tomo-demo-bin"
mkdir -p "$wrapper_dir"
cat > "$wrapper_dir/tomo" << SCRIPT
#!/bin/bash
exec $PWD/target/release/tomo --config-path /tmp/tomo-demo "\$@"
SCRIPT
chmod +x "$wrapper_dir/tomo"
export PATH="$wrapper_dir:$PATH"
trap "rm -rf $wrapper_dir" EXIT
print_success "Wrapper created at $wrapper_dir/tomo"

if ! command -v vhs &> /dev/null; then
print_warning "vhs not found. Install it: https://github.com/charmbracelet/vhs"
fi

print_info "Running demo tape..."
vhs scripts/demo.tape
print_success "Demo tape completed"
}

cmd_all() {
print_info "Running all tasks..."
cmd_format
Expand All @@ -127,6 +155,9 @@ execute_command() {
docs)
cmd_docs
;;
demo)
cmd_demo
;;
all)
cmd_all
;;
Expand Down
Binary file added docs/demo.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions scripts/demo.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Output docs/demo.webp

Set Theme "tokyonight"
Set FontSize 22
Set Width 1920
Set Height 1080
Set Padding 25

Sleep 1s
Type "tomo --focus 2m --short-break 1m"
Sleep 1s
Enter
Sleep 1s

# Timer running (auto-started, counting down from 2:00)
Sleep 3s

# Pause
Space
Sleep 1.5s

# Resume
Space
Sleep 1.5s

# Adjust remaining time (+30s x2, -30s x1)
Right Right
Sleep 1s
Left
Sleep 1s

# Show keybindings overlay
Type "/"
Sleep 2.5s
Type "/"

# Task system — open prompt, type name, create
Type "t"
Sleep 0.5s
Type "My Task"
Sleep 0.5s
Enter
Sleep 2s

# Open Settings
Type "s"
Sleep 1.5s

# Edit Focus duration (already selected at TimerFocus)
Enter
Sleep 0.5s
Backspace
Type "3"
Sleep 0.5s
Enter
Sleep 1s

# Navigate down through Timer items to AutoStartOnLaunch, then toggle
Down Down Down Down
Sleep 0.5s
Enter
Sleep 1s

# Quit triggers UnsavedWarning (2 unsaved changes)
Type "q"
Sleep 3s

# Force quit from warning
Type "q"
Sleep 1s
Loading