Skip to content

oarslan/ClipboardManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClipboardManager

A lightweight macOS menu bar app for clipboard history management. Built with Swift and SwiftUI.

Features

  • Clipboard History — automatically stores copied texts (configurable limit: 20 / 50 / 100)
  • Search & Filter — quickly find items in your history
  • Pin / Favorites — pin important items so they stay at the top and never get removed
  • Snippets — save frequently used texts as permanent snippets
  • Content Type Detection — auto-detects URLs, emails, phone numbers, and color codes with distinct icons
  • Source App Tracking — shows which app each item was copied from
  • Text Transformations — right-click to transform text (uppercase, lowercase, capitalized, trimmed, URL encode/decode)
  • Merge Items — select multiple items and merge them with a separator (newline, space, or comma)
  • Export — export clipboard history as JSON or CSV
  • Sensitive Content Protection — automatically skips passwords from password managers
  • Global Keyboard Shortcut — customizable hotkey to open the panel from anywhere
  • Persists history across app restarts

Requirements

  • macOS 13 (Ventura) or later
  • Xcode 15+ (for building)

Build & Install

  1. Clone the repo

    git clone <repo-url>
    cd ClipboardManager
  2. Install xcodegen (if not installed)

    brew install xcodegen
  3. Generate Xcode project

    xcodegen generate
  4. Open in Xcode

    open ClipboardManager.xcodeproj
  5. Set signing

    • Click ClipboardManager project in the sidebar
    • Go to Signing & Capabilities
    • Select your Team (your Apple ID)
  6. Build & Run

    • Press Cmd+R or click ▶ Run
    • Xcode will build and launch the app
  7. Grant permissions (first launch)

    • macOS will ask for Accessibility permission — enable it in System Settings
    • To set a global shortcut: click the menu bar icon, then Settings → Change → press your keys
  8. Install to Applications (optional)

    • In Xcode menu: Product → Archive or build with Release config
    • Or simply copy from build output:
      BUILT=$(xcodebuild -scheme ClipboardManager -configuration Release -showBuildSettings | grep "BUILT_PRODUCTS_DIR" | awk '{print $3}')
      cp -r "$BUILT/ClipboardManager.app" /Applications/

Usage

Action How
Open history Click the clipboard icon in menu bar (or use your global shortcut)
Copy from history Click any item in the list
Pin an item Right-click → Pin
Delete an item Right-click → Delete
Transform text Right-click → Transform → choose format
Save as snippet Right-click → Save as Snippet
Search history Type in the search bar at the top
Merge items Click Select → choose 2+ items → Merge
Switch tabs Click History / Snippets in the tab bar
Change shortcut Settings → Change → press key combo
Change history limit Settings → History Limit (20 / 50 / 100)
Export history Settings → Export JSON or Export CSV
Clear all history Click "Clear" in header
Quit app Settings → Quit App

Start at Login (optional)

System Settings → General → Login Items → add ClipboardManager.app

Project Structure

ClipboardManager/
├── main.swift              # App entry point
├── AppDelegate.swift       # Status bar, panel, hotkey wiring
├── ClipboardStore.swift    # Data model + UserDefaults persistence
├── ClipboardMonitor.swift  # NSPasteboard polling (0.5s timer)
├── HotkeyManager.swift     # CGEventTap global shortcut
├── ContentView.swift       # SwiftUI main UI (history list, search, merge)
├── SettingsView.swift      # Shortcut, history limit, export settings
├── SnippetStore.swift      # Snippet data model + persistence
├── SnippetView.swift       # Snippets tab UI
├── ContentTypeDetector.swift # URL, email, phone, color detection
├── TextTransformations.swift # Text transform operations
├── ExportManager.swift     # JSON / CSV export with NSSavePanel
└── Info.plist              # LSUIElement=true (no dock icon)

License

MIT

About

A lightweight macOS menu bar app for clipboard history with search, pin, snippets, and global shortcut support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages