Fix Cmd+K conflict and add custom app icon

- Changed AI Generator shortcut from Cmd+K to Cmd+I
- Cmd+K now only triggers Clear Screen
- Created custom terminal-style app icon with Python/PIL
- Updated build script to include icon in app bundle
- Updated all documentation with correct shortcuts
- New DMG with icon included (492K)
This commit is contained in:
2026-01-31 23:56:39 +00:00
parent b94235473c
commit 1a8f23fcb1
10 changed files with 168 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
AppIcon.icns Normal file

Binary file not shown.

BIN
EnhancedTerminal-v3.0.dmg Normal file

Binary file not shown.

View File

@@ -6,6 +6,8 @@
<string>en</string> <string>en</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>EnhancedTerminal</string> <string>EnhancedTerminal</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>com.enhanced.terminal</string> <string>com.enhanced.terminal</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>

Binary file not shown.

View File

@@ -249,7 +249,7 @@ class MainWindowController: NSWindowController {
let toolsMenu = NSMenu(title: "Tools") let toolsMenu = NSMenu(title: "Tools")
toolsMenuItem.submenu = toolsMenu 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(title: "Command Snippets", action: #selector(showSnippets), keyEquivalent: "p"))
toolsMenu.addItem(NSMenuItem.separator()) toolsMenu.addItem(NSMenuItem.separator())
toolsMenu.addItem(NSMenuItem(title: "Keyboard Shortcuts", action: #selector(showShortcuts), keyEquivalent: "?")) toolsMenu.addItem(NSMenuItem(title: "Keyboard Shortcuts", action: #selector(showShortcuts), keyEquivalent: "?"))
@@ -583,7 +583,7 @@ class MainWindowController: NSWindowController {
Middle-click - Paste Middle-click - Paste
Tools: Tools:
Cmd+K - AI Command Generator Cmd+I - AI Command Generator
Cmd+P - Command Snippets Cmd+P - Command Snippets
Cmd+, - Settings Cmd+, - Settings
Cmd+? - This Help Cmd+? - This Help

View File

@@ -627,8 +627,10 @@ class TerminalSession: NSObject, NSTextViewDelegate, NSMenuDelegate {
• Cmd+Shift+D - Split pane horizontally (top-bottom) • Cmd+Shift+D - Split pane horizontally (top-bottom)
• Cmd+Shift+Enter - Zoom/unzoom active pane • Cmd+Shift+Enter - Zoom/unzoom active pane
• Cmd+R - Search command history (fuzzy search) • Cmd+R - Search command history (fuzzy search)
• Cmd+K - AI command generator • Cmd+I - AI command generator
• Cmd+P - Command snippets • Cmd+P - Command snippets
• Cmd+K - Clear screen
• Cmd+Shift+K - Clear scrollback
• Cmd+, - Settings • Cmd+, - Settings
• Cmd+? - Full keyboard shortcuts reference • Cmd+? - Full keyboard shortcuts reference
• Tab - Accept auto-suggestion • Tab - Accept auto-suggestion

View File

@@ -39,6 +39,8 @@ cat > EnhancedTerminal.app/Contents/Info.plist << 'EOF'
<string>en</string> <string>en</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>EnhancedTerminal</string> <string>EnhancedTerminal</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>com.enhanced.terminal</string> <string>com.enhanced.terminal</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
@@ -61,6 +63,12 @@ cat > EnhancedTerminal.app/Contents/Info.plist << 'EOF'
</plist> </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 "✅ Build complete!"
echo "" echo ""
echo "To run the application:" echo "To run the application:"

153
create_icon.sh Executable file
View File

@@ -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