Skip to content

Commit

Permalink
docs: update documentation to match current implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
bartwisch committed Dec 13, 2024
1 parent 4d8c639 commit b8d1e78
Show file tree
Hide file tree
Showing 9 changed files with 429 additions and 0 deletions.
40 changes: 40 additions & 0 deletions markups/concept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# WindPix - Screenshot Integration for Windsurf

## Overview
WindPix is a macOS utility that streamlines the process of sharing screenshots within the Windsurf application. It automates the workflow of capturing, copying, and sending screenshots to the LLM chat interface.

## Core Functionality
1. **Screenshot Capture**
- Triggered by global hotkey (⌘P)
- Supports both full screen and area selection
- Screenshot control panel for accept/redo/cancel

2. **Windsurf Integration**
- Optional automatic chat window focus
- Automatic clipboard management
- Automatic screenshot submission

## Technical Implementation
1. **Screenshot Mechanism**
- Uses native macOS screenshot capabilities
- Supports area selection and full screen
- Built-in screenshot preview and control

2. **Automation Flow**
- Configurable focus chat option
- Automatic Windsurf launch
- Auto-close with Windsurf option

## User Experience
- System tray menu for easy access
- Configurable settings via menu
- Visual feedback through control panel
- How-to instructions built in

## Current Features
- Global hotkey (⌘P)
- Area selection toggle
- Focus chat toggle
- Auto-close with Windsurf toggle
- Built-in instructions
- System tray controls
81 changes: 81 additions & 0 deletions markups/distribution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Distributing WindPix

To distribute WindPix to other users, follow these steps:

## For Developers (Creating the Distribution)

1. Build the release version:
```bash
cd WindPixMVP
swift build -c release
```

2. Create an App Bundle:
```bash
# Create the app bundle structure
mkdir -p WindPix.app/Contents/MacOS
mkdir -p WindPix.app/Contents/Resources

# Copy the built executable
cp .build/release/WindPixMVP WindPix.app/Contents/MacOS/WindPix

# Copy instructions.md to Resources
cp ../instructions.md WindPix.app/Contents/Resources/
```

3. Create Info.plist:
Create a file at `WindPix.app/Contents/Info.plist` with the following content:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>WindPix</string>
<key>CFBundleIdentifier</key>
<string>com.hugo.windpix</string>
<key>CFBundleName</key>
<string>WindPix</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>LSUIElement</key>
<true/>
</dict>
</plist>
```

4. Create a ZIP archive:
```bash
zip -r WindPix.zip WindPix.app
```

## For Users (Installing the App)

1. Download the WindPix.zip file
2. Extract the ZIP file
3. Move WindPix.app to your Applications folder
4. When first launching the app:
- Right-click on WindPix.app and select "Open"
- Click "Open" in the security dialog that appears
- Grant the necessary permissions when prompted:
* Screen Recording (for taking screenshots)
* Accessibility (for keyboard shortcuts)

## Requirements

- macOS 10.15 or later
- Windsurf IDE installed

## Notes

- The app is currently unsigned, so users will need to explicitly allow it to run
- The app requires Windsurf IDE to be running
- Make sure to grant all requested permissions for full functionality

## Support

For support or questions, contact: bartwisch666@gmail.com
1 change: 1 addition & 0 deletions markups/featurelist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- always automatically focus on cascade chat window
52 changes: 52 additions & 0 deletions markups/icon_instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Creating an App Icon for WindPix

To create a proper app icon, you'll need to create images in the following sizes and save them in the `AppIcon.iconset` folder:

1. Required icon files and sizes:
- icon_16x16.png (16×16)
- icon_16x16@2x.png (32×32)
- icon_32x32.png (32×32)
- icon_32x32@2x.png (64×64)
- icon_128x128.png (128×128)
- icon_128x128@2x.png (256×256)
- icon_256x256.png (256×256)
- icon_256x256@2x.png (512×512)
- icon_512x512.png (512×512)
- icon_512x512@2x.png (1024×1024)

2. After creating these images, convert them to .icns:
```bash
cd WindPixMVP
iconutil -c icns AppIcon.iconset
```

3. Add to Info.plist:
The following entry will be added to Info.plist:
```xml
<key>CFBundleIconFile</key>
<string>AppIcon</string>
```

## Icon Design Guidelines

1. Keep it simple and recognizable even at small sizes
2. Use the macOS icon grid for proper proportions
3. Consider both light and dark backgrounds
4. Make sure the icon looks good in both color and monochrome

## Tools for Creating Icons

You can use these tools to create your icon:
- Adobe Photoshop
- Sketch
- Figma
- Pixelmator Pro
- Icon Set Creator (Mac App Store)

## Testing the Icon

After creating the icon:
1. Build the app bundle
2. Copy AppIcon.icns to WindPix.app/Contents/Resources/
3. Update Info.plist
4. The icon should appear in Finder and the Dock
17 changes: 17 additions & 0 deletions markups/idea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Initial Idea vs Current Implementation

## Original Idea
A program for Mac that creates a screenshot with a shortcut.
The screenshot is copied to the clipboard.
Then the key combination "cmd + l" is pressed to focus the chat window in the "windsurf" program.
After a 1-second delay, the image from the clipboard is pasted into the chat window using "cmd + v".
After another 1-second delay, the ENTER key is pressed to forward the image to the LLM.

## Current Implementation
The idea has evolved into a more sophisticated application with:
- System tray presence with wind icon
- Configurable screenshot behavior (area/full screen)
- Optional chat window focus
- Screenshot preview and control panel
- Automatic Windsurf launch
- Auto-close capability
39 changes: 39 additions & 0 deletions markups/instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Welcome to WindPix - Your Screenshot Companion for Windsurf

WindPix makes it easy to include screenshots in your Windsurf workflow, helping you communicate more effectively with the LLM.

## Getting Started
1. Launch WindPix - you'll see a wind icon in your system tray
2. WindPix will automatically launch Windsurf if it's not running
3. Click the wind icon to access settings and options

## Taking Screenshots
1. Press ⌘P to initiate a screenshot
2. If area selection is enabled, select the area you want to capture
3. In the control panel that appears:
- Click "Accept" to send the screenshot to Windsurf
- Click "Redo" to take another screenshot
- Click "Cancel" to abort

## Configuration Options
Access these by clicking the wind icon:
- **Use Area Selection**: Toggle between area selection and full screen
- **Focus Chat Before Paste**: Automatically focus the chat window
- **Auto-close with Windsurf**: Close WindPix when Windsurf closes

## Required Permissions
WindPix needs these permissions to function:
- Screen Recording (for screenshots)
- Accessibility (for keyboard simulation)
- Input Monitoring (for hotkey)

## Tips
- You can take multiple screenshots for one prompt
- Use area selection for precise captures
- Keep Windsurf's chat window visible for best results

## Support
For issues or suggestions, visit:
https://github.com/bartwisch/windpix/issues

Created by Hugo (bartwisch666@gmail.com)
58 changes: 58 additions & 0 deletions markups/mvp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# WindPix MVP Status

## Implemented Features
1. Global hotkey (⌘P)
2. Area selection and full screen modes
3. Screenshot control panel
- Accept/Redo/Cancel options
4. System tray menu
- Configuration options
- How-to instructions
5. Automatic Windsurf integration
- Auto-launch
- Optional chat focus
- Auto-close capability

## Current Tech Stack
- Swift command-line tool with AppKit UI
- Global hotkey using Carbon API
- Screenshot capture using native APIs
- System tray integration
- Window management

## Implemented Functionality

1. **Core Application**
```swift
// AppDelegate manages:
- System tray icon and menu
- Windsurf monitoring
- Configuration options
- Instructions window
```

2. **Permissions**
✓ Screen Recording
✓ Accessibility
✓ Input Monitoring

## Current Status
- MVP is fully functional
- Core features implemented
- Basic UI through system tray
- Error handling in place
- Configuration options available

## Completed MVP Goals
✓ Screenshot capture with hotkey
✓ Preview and control panel
✓ System tray presence
✓ Basic settings
✓ Windsurf integration

## Future Enhancements
- Custom keyboard shortcuts
- Enhanced error notifications
- Installation package
- Auto-updates
- Multiple monitor improvements
85 changes: 85 additions & 0 deletions markups/techstack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# WindPix Technical Stack

## Core Technologies

### Programming Language
- **Swift 5.9+**
- Native macOS development
- System API integration
- Clean and modern syntax
- Type-safe operations

### Frameworks Used
- **AppKit**
- System tray implementation
- Window and panel management
- Menu creation and handling
- Basic UI components

- **Foundation**
- Core functionality
- File operations
- Timer management
- Error handling

- **Carbon**
- Global hotkey registration
- Keyboard event handling

### System Integration
- **Screenshot Capabilities**
- Native screenshot commands
- Area selection support
- Clipboard management

- **Window Management**
- Windsurf window detection
- Focus management
- Event simulation

### Development Tools
- **Xcode**
- Development environment
- Debugging tools
- Performance monitoring

### Distribution
- **GitHub**
- Version control
- Issue tracking
- Release management

### Current Architecture
- **AppDelegate**
- Application lifecycle
- Menu management
- Configuration handling

- **HotkeyManager**
- Keyboard event handling
- Screenshot automation
- Window management

- **ScreenshotControlPanel**
- User interface for preview
- Action handling
- Visual feedback

## System Requirements
- macOS 13.0 (Ventura) or newer
- 20MB disk space
- Minimal RAM usage

## Development Environment Setup
1. Install Xcode from Mac App Store
2. Install command line tools:
```bash
xcode-select --install
```
3. Clone repository and open in Xcode

## Testing Framework
- **XCTest**
- Unit testing
- UI testing
- Performance testing
Loading

0 comments on commit b8d1e78

Please sign in to comment.