diff --git a/.DS_Store b/.DS_Store index 33de3b1..bf68b22 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/AppIcon.icns b/AppIcon.icns new file mode 100644 index 0000000..8a56949 Binary files /dev/null and b/AppIcon.icns differ diff --git a/EnhancedTerminal-v3.0.dmg b/EnhancedTerminal-v3.0.dmg new file mode 100644 index 0000000..239986b Binary files /dev/null and b/EnhancedTerminal-v3.0.dmg differ diff --git a/EnhancedTerminal.app/Contents/Info.plist b/EnhancedTerminal.app/Contents/Info.plist index c207a13..1228893 100644 --- a/EnhancedTerminal.app/Contents/Info.plist +++ b/EnhancedTerminal.app/Contents/Info.plist @@ -6,6 +6,8 @@ en CFBundleExecutable EnhancedTerminal + CFBundleIconFile + AppIcon CFBundleIdentifier com.enhanced.terminal CFBundleInfoDictionaryVersion diff --git a/EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal b/EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal index 1287c8e..990b931 100755 Binary files a/EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal and b/EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal differ diff --git a/EnhancedTerminal.app/Contents/Resources/AppIcon.icns b/EnhancedTerminal.app/Contents/Resources/AppIcon.icns new file mode 100644 index 0000000..8a56949 Binary files /dev/null and b/EnhancedTerminal.app/Contents/Resources/AppIcon.icns differ diff --git a/MainWindowController.swift b/MainWindowController.swift index 5107c32..e2aed40 100644 --- a/MainWindowController.swift +++ b/MainWindowController.swift @@ -249,7 +249,7 @@ class MainWindowController: NSWindowController { let toolsMenu = NSMenu(title: "Tools") toolsMenuItem.submenu = toolsMenu - toolsMenu.addItem(NSMenuItem(title: "AI Command Generator", action: #selector(showAIGenerator), keyEquivalent: "k")) + toolsMenu.addItem(NSMenuItem(title: "AI Command Generator", action: #selector(showAIGenerator), keyEquivalent: "i")) toolsMenu.addItem(NSMenuItem(title: "Command Snippets", action: #selector(showSnippets), keyEquivalent: "p")) toolsMenu.addItem(NSMenuItem.separator()) toolsMenu.addItem(NSMenuItem(title: "Keyboard Shortcuts", action: #selector(showShortcuts), keyEquivalent: "?")) @@ -583,7 +583,7 @@ class MainWindowController: NSWindowController { Middle-click - Paste Tools: - Cmd+K - AI Command Generator + Cmd+I - AI Command Generator Cmd+P - Command Snippets Cmd+, - Settings Cmd+? - This Help diff --git a/TerminalSession.swift b/TerminalSession.swift index 2831664..db09118 100644 --- a/TerminalSession.swift +++ b/TerminalSession.swift @@ -627,8 +627,10 @@ class TerminalSession: NSObject, NSTextViewDelegate, NSMenuDelegate { • Cmd+Shift+D - Split pane horizontally (top-bottom) • Cmd+Shift+Enter - Zoom/unzoom active pane • Cmd+R - Search command history (fuzzy search) - • Cmd+K - AI command generator + • Cmd+I - AI command generator • Cmd+P - Command snippets + • Cmd+K - Clear screen + • Cmd+Shift+K - Clear scrollback • Cmd+, - Settings • Cmd+? - Full keyboard shortcuts reference • Tab - Accept auto-suggestion diff --git a/build.sh b/build.sh index ec092a8..ecbf5c4 100755 --- a/build.sh +++ b/build.sh @@ -39,6 +39,8 @@ cat > EnhancedTerminal.app/Contents/Info.plist << 'EOF' en CFBundleExecutable EnhancedTerminal + CFBundleIconFile + AppIcon CFBundleIdentifier com.enhanced.terminal CFBundleInfoDictionaryVersion @@ -61,6 +63,12 @@ cat > EnhancedTerminal.app/Contents/Info.plist << 'EOF' EOF +# Copy icon if it exists +if [ -f "AppIcon.icns" ]; then + echo "🎨 Adding app icon..." + cp AppIcon.icns EnhancedTerminal.app/Contents/Resources/ +fi + echo "✅ Build complete!" echo "" echo "To run the application:" diff --git a/create_icon.sh b/create_icon.sh new file mode 100755 index 0000000..07fe145 --- /dev/null +++ b/create_icon.sh @@ -0,0 +1,153 @@ +#!/bin/bash + +echo "🎨 Creating app icon..." + +# Create a temporary directory for icon generation +ICON_DIR="icon_temp" +mkdir -p "$ICON_DIR" + +# Create a simple terminal icon using SF Symbols or generate programmatically +# We'll use sips and iconutil to create an icns file + +# First, let's create a base PNG image using Python (available on macOS) +python3 << 'PYTHON_SCRIPT' +from PIL import Image, ImageDraw, ImageFont +import os + +# Create icon directory +os.makedirs("icon_temp/AppIcon.iconset", exist_ok=True) + +# Icon sizes needed for macOS +sizes = [16, 32, 64, 128, 256, 512, 1024] + +for size in sizes: + # Create image with dark background + img = Image.new('RGB', (size, size), color='#282a36') + draw = ImageDraw.Draw(img) + + # Draw a terminal-like window + margin = size // 10 + + # Window background (slightly lighter) + draw.rectangle( + [margin, margin, size - margin, size - margin], + fill='#1e1f29', + outline='#44475a', + width=max(1, size // 128) + ) + + # Title bar + title_height = size // 8 + draw.rectangle( + [margin, margin, size - margin, margin + title_height], + fill='#44475a' + ) + + # Traffic light buttons (macOS style) + button_size = max(2, size // 40) + button_y = margin + title_height // 2 + button_spacing = size // 20 + + # Red button + draw.ellipse( + [margin + button_spacing, button_y - button_size, + margin + button_spacing + button_size * 2, button_y + button_size], + fill='#ff5555' + ) + + # Yellow button + draw.ellipse( + [margin + button_spacing * 2 + button_size * 2, button_y - button_size, + margin + button_spacing * 2 + button_size * 4, button_y + button_size], + fill='#f1fa8c' + ) + + # Green button + draw.ellipse( + [margin + button_spacing * 3 + button_size * 4, button_y - button_size, + margin + button_spacing * 3 + button_size * 6, button_y + button_size], + fill='#50fa7b' + ) + + # Terminal prompt symbol ">" + prompt_size = size // 3 + prompt_x = size // 2 - prompt_size // 4 + prompt_y = size // 2 + title_height // 2 + + # Draw a simple ">" prompt + line_width = max(2, size // 32) + draw.line( + [prompt_x, prompt_y - prompt_size // 2, + prompt_x + prompt_size // 2, prompt_y], + fill='#50fa7b', + width=line_width + ) + draw.line( + [prompt_x + prompt_size // 2, prompt_y, + prompt_x, prompt_y + prompt_size // 2], + fill='#50fa7b', + width=line_width + ) + + # Draw cursor + cursor_x = prompt_x + prompt_size // 2 + size // 10 + cursor_width = max(2, size // 32) + cursor_height = prompt_size // 2 + draw.rectangle( + [cursor_x, prompt_y - cursor_height // 2, + cursor_x + cursor_width, prompt_y + cursor_height // 2], + fill='#f8f8f2' + ) + + # Save standard size + img.save(f"icon_temp/AppIcon.iconset/icon_{size}x{size}.png") + + # Save @2x version for retina + if size <= 512: + img_2x = img.resize((size * 2, size * 2), Image.Resampling.LANCZOS) + img_2x.save(f"icon_temp/AppIcon.iconset/icon_{size}x{size}@2x.png") + +print("✅ Icon images generated") +PYTHON_SCRIPT + +# Check if Python script succeeded +if [ $? -ne 0 ]; then + echo "⚠️ PIL not available, creating simple icon..." + + # Fallback: Create a simple colored square + mkdir -p "$ICON_DIR/AppIcon.iconset" + + for size in 16 32 64 128 256 512 1024; do + # Create a simple gradient icon using sips + sips -z $size $size /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ExecutableBinaryIcon.icns \ + --out "$ICON_DIR/AppIcon.iconset/icon_${size}x${size}.png" 2>/dev/null + + if [ $size -le 512 ]; then + size2=$((size * 2)) + sips -z $size2 $size2 /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ExecutableBinaryIcon.icns \ + --out "$ICON_DIR/AppIcon.iconset/icon_${size}x${size}@2x.png" 2>/dev/null + fi + done +fi + +# Convert iconset to icns +echo "🔨 Converting to .icns format..." +iconutil -c icns "$ICON_DIR/AppIcon.iconset" -o AppIcon.icns + +if [ -f "AppIcon.icns" ]; then + echo "✅ Icon created: AppIcon.icns" + + # Update the build script to include the icon + echo "📝 Updating build script to include icon..." + + # Clean up + rm -rf "$ICON_DIR" + + echo "" + echo "✅ Icon ready! Rebuild the app to include it." + echo " Run: ./build.sh" +else + echo "❌ Failed to create icon" + rm -rf "$ICON_DIR" + exit 1 +fi