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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Binaries for programs and plugins
repo/*
.flatpak-builder/*
build/
*.exe
*.exe~
*.dll
Expand Down
85 changes: 85 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,91 @@ All notable changes to the Cycles project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.0] - 2025-11-17

### Added
- **Persistent Settings System** (`settings.go`):
- Settings automatically save and load using Fyne preferences
- Theme preference (Auto, Light, Dark)
- Grid columns, history size, update interval
- Logical/physical cores preference
- **Settings UI Dialog** (`settingsui.go`):
- Comprehensive settings dialog with sliders and controls
- Theme selector dropdown
- Grid columns slider (1-16)
- History size slider (10-100)
- Update interval input
- Logical cores checkbox
- Reset to defaults button with confirmation
- **Enhanced Theme System** (`theme.go`):
- Dynamic theme switching without restart
- Custom theme implementation
- `ApplyTheme()` function for programmatic theme changes
- `isDarkTheme()` helper function
- **Improved Menu System** (update `main.go`):
- File menu with "Preferences..." option
- View menu with "Toggle Theme" quick action
- Reorganized menu structure (File | View | Help)
- Settings accessible via File → Preferences
- **Command-line Flag Priority**:
- Command-line flags now override saved settings
- Seamless integration between CLI and persistent settings

### Changed
- Application now loads saved preferences on startup
- Theme applies immediately on selection
- Settings persist across application restarts
- Menu structure reorganized for better UX

### Technical Improvements
- Settings stored using Fyne's preferences API
- Platform-independent settings storage
- Type-safe settings management
- Comprehensive settings validation
- Unit tests for settings functionality

### Fixed
- Theme switching now works reliably
- Settings apply correctly on save

## [0.5.0] - 2025-11-17

### Added
- **Memory Monitoring Tab**: New dedicated tab for system memory monitoring
- Real-time memory usage display (Total, Used, Free, Cached)
- Memory usage percentage with historical graph
- Automatic history tracking
- **Tabbed Interface**: Switched from single-view to tabbed layout
- CPU tab: Existing CPU core monitoring
- Memory tab: New memory monitoring view
- **Memory Tile Component** (`memorytile.go`):
- Displays comprehensive memory statistics
- Shows usage graph over time
- Formatted memory sizes (GB/MB)
- **Enhanced System Information** (`sysinfo.go`):
- `GetMemoryInfoDetailed()`: Reads detailed memory info from /proc/meminfo
- `UpdateMemoryInfo()`: Updates memory tiles with current data
- Tracks MemTotal, MemFree, MemAvailable, Cached, and Buffers
- **Memory Utility Functions**:
- `formatMemorySize()`: Human-readable memory sizes
- `formatMemoryPercent()`: Formatted percentage display
- **Unit Tests** (`memorytile_test.go`):
- Tests for memory tile creation
- Tests for memory formatting functions
- Validation of component initialization

### Changed
- Main window now uses tabbed layout instead of single grid
- CPU tiles renamed to `cpuTiles` for clarity
- Separate update goroutines for CPU and Memory monitoring
- Window adapts to tabbed content structure

### Technical Improvements
- Modular memory monitoring component following existing tile pattern
- Independent update loops for different metric types
- Reuses existing graph rendering infrastructure
- Follows established code organization patterns

## [0.4.1] - 2025-10-15

### Changed
Expand Down
155 changes: 138 additions & 17 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,40 +162,161 @@ func GetNewSystemInfo() (InfoType, error) {

## Development Workflow

### Setup
### Quick Start

The easiest way to get started:

```bash
# Clone repository
git clone https://github.com/TylerCode/cycles
cd cycles

# Install dependencies
# Run automated setup (installs all dependencies)
make setup
# or manually: ./scripts/setup-dev.sh

# Build the application
make build

# Run it
make run
```

### Setup (Detailed)

#### Automated Setup (Recommended)

Use the automated setup script which detects your OS and installs dependencies:

```bash
./scripts/setup-dev.sh
```

Supported distributions:
- **Ubuntu-based:** Ubuntu, Debian, Pop!_OS, Linux Mint, Zorin OS, Elementary OS, KDE neon
- **Red Hat-based:** Fedora, RHEL, CentOS, Rocky Linux, AlmaLinux
- **Arch-based:** Arch Linux, Manjaro, EndeavourOS

**Note:** The script also has a smart fallback - if your distribution isn't explicitly listed, it will detect your package manager (apt-get, dnf, or pacman) and use the appropriate method automatically.

#### Manual Setup

If the automated setup doesn't work for your OS:

```bash
# Install system dependencies (Ubuntu/Debian)
sudo apt-get install libgl1-mesa-dev libxcursor-dev libxrandr-dev \
libxinerama-dev libxi-dev libglfw3-dev libxxf86vm-dev
libxinerama-dev libxi-dev libglfw3-dev libxxf86vm-dev \
pkg-config gcc make

# Get Go dependencies
# Install Go dependencies
go mod download
go mod tidy
go mod vendor
```

### Development
### Build System (Makefile)

The project includes a comprehensive Makefile for common tasks:

```bash
# Build
go build -o cycles
# Build a single bundled binary
make build
# Output: build/cycles

# Run
./cycles
# Build and run
make run

# Run with options
./cycles --columns 8 --interval 1s
# Quick development build (faster, no optimization)
make dev

# Format code
go fmt ./...
# Build optimized release binary
make release

# Check for issues
go vet ./...
# Clean build artifacts
make clean

# Run tests
go test -v ./...
make test

# Run tests (short output)
make test-short

# Format code
make fmt

# Run go vet
make vet

# Format, vet, and test in one command
make check

# Install dependencies
make install-deps

# Show binary size information
make size

# Install to /usr/local/bin (requires sudo)
make install

# Uninstall from /usr/local/bin
make uninstall

# Show build environment info
make info

# Display all available commands
make help
```

### Development Commands

#### Building
```bash
# Standard build (optimized, single binary)
make build

# Development build (faster compilation, for testing)
make dev

# Release build (fully optimized, stripped)
make release
```

#### Running
```bash
# Build and run with default settings
make run

# Run manually with custom options
./build/cycles --columns 8 --interval 1s --history 60
```

#### Testing
```bash
# Run all tests with verbose output
make test

# Run tests quietly
make test-short

# Run benchmarks
make bench

# Format, vet, and test everything
make check
```

#### Code Quality
```bash
# Format all Go files
make fmt

# Run static analysis
make vet

# Check everything (format + vet + test)
make check
```

### Testing Checklist
Expand Down
Loading
Loading