Skip to content

Bojun-Vvibe/PasteFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PasteFlow Icon

PasteFlow

A lightweight, native macOS clipboard manager that lives in your menu bar.
Never lose a copied item again.

macOS 13.0+ Swift 5.0 SwiftUI MIT License


✨ Features

Feature Description
🖥️ Menu Bar App Runs quietly in the menu bar — zero Dock clutter
📋 Clipboard History Automatically saves up to 200 clipboard entries
🏷️ Smart Categories Auto-detects content type: Text, URL, Code, Email, Number, Path
🔍 Quick Search Filter history instantly with real-time search
📌 Pin Important Items Pin entries so they survive history clears
🖱️ One-Click Copy Click any item to copy it back to clipboard
⌨️ Global Hotkey ⌘ + ⇧ + V to open from anywhere
💾 Persistent Storage History survives app restarts via local storage
🎨 Native UI Built with SwiftUI, follows Apple's Human Interface Guidelines
🌗 Light & Dark Mode Adapts automatically to system appearance

🖼️ Screenshots

Menu Bar Icon Clipboard Panel
Lives in your menu bar Clean, categorized clipboard history

Replace with actual screenshots after building the app.

🚀 Getting Started

Prerequisites

  • macOS 13.0 (Ventura) or later
  • Xcode 15.0+ (for building from source)

Build from Source

# Clone the repository
git clone https://github.com/Bojun-Vvibe/PasteFlow.git
cd PasteFlow

# Open in Xcode
open ClipBoard.xcodeproj

# Build and Run: ⌘ + R

Download Release

Download the latest .app from Releases and drag it to /Applications.

📖 Usage

  1. Launch — PasteFlow appears as an icon in your menu bar (no Dock icon)
  2. Copy anything — It automatically captures clipboard text content
  3. Click the menu bar icon or press ⌘ + ⇧ + V to open the panel
  4. Click any item to copy it back to your clipboard
  5. Filter by category using the tabs: All · Text · URL · Code · Email · Number · Path
  6. Search to find specific items from history
  7. Pin important items by hovering and clicking the 📌 button
  8. Clear history via the 🗑️ icon (with option to preserve pinned items)

🏗️ Architecture

ClipBoard/
├── ClipBoard.xcodeproj           # Xcode project configuration
├── GenerateIcon.swift            # Programmatic app icon generator
├── LICENSE
├── README.md
└── ClipBoard/
    ├── ClipBoardApp.swift        # App entry point & NSStatusItem menu bar setup
    ├── ClipboardManager.swift    # Core clipboard monitoring, storage & category detection
    ├── ClipboardContentView.swift# SwiftUI popover UI with search, filter & item rows
    ├── Info.plist                # App configuration (LSUIElement for menu bar only)
    ├── ClipBoard.entitlements    # App sandbox entitlements
    └── Assets.xcassets/          # App icons & accent color
        ├── AppIcon.appiconset/   # All icon sizes (16–1024pt, generated)
        └── AccentColor.colorset/ # Custom accent color

Key Design Decisions

  • NSStatusItem + NSPopover — Standard macOS pattern for menu bar apps. The popover provides a native feel and auto-dismisses on outside clicks.
  • Timer-based polling (0.5s) — Monitors NSPasteboard.general.changeCount for clipboard changes. Lightweight and reliable.
  • UserDefaults persistence — Simple JSON serialization for clipboard history. No external database dependency.
  • LSUIElement = true — App runs as an accessory (menu bar only), no Dock icon or main window.
  • Content category detection — Regex and heuristic-based classification into 6 categories for easy filtering.
  • Pinned items — Pinned entries float to top and are protected from bulk clear operations.

🎨 Regenerate App Icons

The app icons are programmatically generated with a gradient design. To regenerate all sizes:

swift GenerateIcon.swift ClipBoard/Assets.xcassets/AppIcon.appiconset

This generates icons for all required macOS sizes (16×16 to 512×512 @2x).

🔐 Permissions

PasteFlow requires:

  • Accessibility permission — For the global hotkey (⌘ + ⇧ + V) and simulating paste events
  • The app only monitors text content from the system clipboard
  • All data is stored locally on your machine — nothing is sent to any server

🛠️ Tech Stack

Component Technology
Language Swift 5
UI Framework SwiftUI
Platform macOS 13.0+
Menu Bar NSStatusItem + NSPopover
Storage UserDefaults (JSON)
Clipboard NSPasteboard polling (0.5s)
Hotkey NSEvent global monitor
Icons Programmatically generated (NSImage + NSBezierPath)

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


Made with ❤️ using SwiftUI

About

A native macOS clipboard manager built with SwiftUI — small product, strong taste, fast iteration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages