Skip to content

Commit 38b0a7b

Browse files
authored
Merge pull request #49 from mrgoonie/goon
feat: clipboard improvements and editor settings persistence
2 parents 068ce9a + e1e051d commit 38b0a7b

20 files changed

Lines changed: 1996 additions & 242 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ prompt.md
7070
# Gemini CLI settings (symlink to .claude/.mcp.json)
7171
.gemini/settings.json
7272
.claude/settings.bak.json
73-
.claude/active-plan
73+
.claude/active-plan
74+
.claude

.repomixignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
docs/*
2+
plans/*
3+
assets/*
4+
dist/*
5+
coverage/*
6+
build/*
7+
ios/*
8+
android/*
9+
tests/*
10+
__tests__/*
11+
__pycache__/*
12+
node_modules/*
13+
14+
.opencode/*
15+
.claude/*
16+
.serena/*
17+
.pnpm-store/*
18+
.github/*
19+
.dart_tool/*
20+
.idea/*
21+
.husky/*
22+
.venv/*

CLAUDE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Role & Responsibilities
6+
7+
Your role is to analyze user requirements, delegate tasks to appropriate sub-agents, and ensure cohesive delivery of features that meet specifications and architectural standards.
8+
9+
## Workflows
10+
11+
- Primary workflow: `./.claude/workflows/primary-workflow.md`
12+
- Development rules: `./.claude/workflows/development-rules.md`
13+
- Orchestration protocols: `./.claude/workflows/orchestration-protocol.md`
14+
- Documentation management: `./.claude/workflows/documentation-management.md`
15+
- And other workflows: `./.claude/workflows/*`
16+
17+
**IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
18+
**IMPORTANT:** You must follow strictly the development rules in `./.claude/workflows/development-rules.md` file.
19+
**IMPORTANT:** Before you plan or proceed any implementation, always read the `./README.md` file first to get context.
20+
**IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
21+
**IMPORTANT:** In reports, list any unresolved questions at the end, if any.
22+
23+
## Python Scripts (Skills)
24+
25+
When running Python scripts from `.claude/skills/`, use the venv Python interpreter:
26+
- **Linux/macOS:** `.claude/skills/.venv/bin/python3 scripts/xxx.py`
27+
- **Windows:** `.claude\skills\.venv\Scripts\python.exe scripts\xxx.py`
28+
29+
This ensures packages installed by `install.sh` (google-genai, pypdf, etc.) are available.
30+
31+
## Documentation Management
32+
33+
We keep all important docs in `./docs` folder and keep updating them, structure like below:
34+
35+
```
36+
./docs
37+
├── project-overview-pdr.md
38+
├── code-standards.md
39+
├── codebase-summary.md
40+
├── design-guidelines.md
41+
├── deployment-guide.md
42+
├── system-architecture.md
43+
└── project-roadmap.md
44+
```
45+
46+
**IMPORTANT:** *MUST READ* and *MUST COMPLY* all *INSTRUCTIONS* in project `./CLAUDE.md`, especially *WORKFLOWS* section is *CRITICALLY IMPORTANT*, this rule is *MANDATORY. NON-NEGOTIABLE. NO EXCEPTIONS. MUST REMEMBER AT ALL TIMES!!!*

README.md

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,35 @@ Coming soon. See GitHub releases for previews.
9595

9696
### Keyboard Shortcuts
9797

98+
**Global Hotkeys (Customizable):**
9899
| Shortcut | Action |
99100
|----------|--------|
100101
| `Ctrl+PrintScreen` | Region capture (default) |
101102
| `PrintScreen` | Fullscreen capture |
102103
| `Ctrl+Shift+PrintScreen` | Window capture |
103-
| `Ctrl+S` | Export screenshot |
104-
| `Escape` | Cancel current operation |
105104

106-
*Note: Global hotkeys are customizable in Settings → Hotkeys*
105+
*Customizable in Settings → Hotkeys*
106+
107+
**Editor Shortcuts (App Window):**
108+
109+
| Shortcut | Action |
110+
|----------|--------|
111+
| `V` | Select tool (pointer/move) |
112+
| `R` | Rectangle annotation |
113+
| `E` | Ellipse annotation |
114+
| `A` | Arrow annotation |
115+
| `L` | Line annotation |
116+
| `T` | Text annotation |
117+
| `C` | Crop tool |
118+
| `Ctrl+Z` | Undo annotation |
119+
| `Ctrl+Shift+Z` or `Ctrl+Y` | Redo annotation |
120+
| `Delete` / `Backspace` | Delete selected annotation |
121+
| `Escape` | Deselect / cancel crop mode |
122+
| `Ctrl+O` | Import image file |
123+
| `Ctrl+V` | Paste image from clipboard |
124+
| `Ctrl+S` | Quick save |
125+
| `Ctrl+Shift+S` | Export with format dialog |
126+
| `Ctrl+C` | Copy to clipboard |
107127

108128
---
109129

@@ -132,7 +152,10 @@ Access via Settings icon in title bar (⚙️).
132152

133153
#### Export
134154
- **Default format** - PNG or JPEG
135-
- **JPEG quality** - 0-100 (default: 95)
155+
- **JPEG quality** - 0-100 slider (default: 95)
156+
- 95+ = visually lossless
157+
- 75-90 = balanced (recommended)
158+
- 50-75 = compressed (smaller files)
136159
- **Include background** - Apply gradient to exported image
137160

138161
### Editor Settings
@@ -332,17 +355,16 @@ Contributions welcome! Please:
332355
- PNG export
333356
- Configuration dialog
334357

335-
### v1.1 (In Progress)
336-
- Advanced annotations (arrow, line, text)
337-
- Non-destructive cropping
338-
- Gradient backgrounds
339-
- JPEG export
340-
- Output aspect ratios
358+
### v1.2 (Completed)
359+
- Undo/redo ✓
360+
- Keyboard shortcuts ✓
361+
- Clipboard import ✓
362+
- JPEG quality control ✓
341363

342-
### v1.2 (Planned)
343-
- Undo/redo
344-
- Keyboard shortcuts reference
364+
### v1.3 (Planned)
345365
- Dark/light theme toggle
366+
- Batch export operations
367+
- Cloud sync for settings
346368

347369
### v2.0 (Future)
348370
- Screen recording
@@ -415,12 +437,22 @@ See [LICENSE](./LICENSE) file for details.
415437

416438
## Changelog
417439

440+
### v1.2 (2025-12-24)
441+
- ✨ Clipboard image import via Ctrl+V
442+
- ✨ Configurable JPEG compression quality (0-100 scale)
443+
- ✨ Comprehensive keyboard shortcuts for all tools
444+
- ✨ Tool selection via single-key shortcuts (V, R, E, A, L, T, C)
445+
- ✨ Editor annotations with Undo/Redo shortcuts
446+
- 🚀 Performance improvements for clipboard operations
447+
- 📝 Enhanced documentation with keyboard reference
448+
418449
### v1.1 (2025-12-03)
419450
- ✨ Add arrow and line annotations
420451
- ✨ Add text annotation tool
421452
- ✨ Implement non-destructive cropping
422453
- ✨ Add 24 gradient background presets
423454
- ✨ Support multiple output aspect ratios
455+
- ✨ Copy file path button + auto-copy on quick save
424456
- 🚀 Performance improvements for large images
425457
- 📝 Complete documentation suite
426458

app.go

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,9 @@ func (a *App) startup(ctx context.Context) {
8989
a.lastWidth = cfg.Window.Width
9090
a.lastHeight = cfg.Window.Height
9191

92-
// Handle "start minimized to tray" setting
92+
// Track hidden state if app started minimized to tray (set via Wails StartHidden option)
9393
if cfg.Startup.MinimizeToTray {
94-
// Use goroutine with delay to let window fully initialize first
95-
go func() {
96-
time.Sleep(100 * time.Millisecond)
97-
runtime.WindowHide(a.ctx)
98-
}()
94+
a.isWindowHidden = true
9995
}
10096
}
10197

@@ -750,3 +746,17 @@ func (a *App) SetSkippedVersion(version string) error {
750746
func (a *App) GetSkippedVersion() string {
751747
return a.config.Update.SkippedVersion
752748
}
749+
750+
// GetEditorConfig returns the current editor panel settings
751+
func (a *App) GetEditorConfig() *config.EditorConfig {
752+
return &a.config.Editor
753+
}
754+
755+
// SaveEditorConfig saves editor panel settings to persistent config
756+
func (a *App) SaveEditorConfig(editor *config.EditorConfig) error {
757+
if editor == nil {
758+
return nil
759+
}
760+
a.config.Editor = *editor
761+
return a.config.Save()
762+
}

0 commit comments

Comments
 (0)