A lightweight, open-source macOS utility app. ShelfMate lets you shake your cursor while dragging files to spawn a floating "shelf" where you can temporarily collect files before dropping them to their final destination.
- Shake to Create Shelf: While dragging files, quickly shake your cursor to spawn a floating shelf
- Global Keyboard Shortcut: Press ⌘⇧D to create a new shelf instantly
- Multi-File Collection: Drop multiple files onto the shelf from any application
- Drag Back Out: Easily drag collected files from the shelf to any destination
- Floating Window: The shelf stays on top of all windows for easy access
- Menu Bar App: Runs quietly in your menu bar, no dock icon clutter
- Share Files: AirDrop, Mail, Messages via system share sheet
- Quick Look: Press Space to preview selected files
- Create ZIP: Archive multiple files into a ZIP
- Compress Images: Reduce image file sizes with quality options
- Batch Rename: Rename multiple files with patterns ({name}, {n}, {date})
- Clipboard Support: Cmd+C to copy, Cmd+V to paste files
- Recent Shelves: Reopen previously closed shelves from menu bar
- Pinned Shelves: Persist important shelves across app restarts
- Edge Docking: Minimize shelves to screen edge, expand on hover
- iCloud Drive: Upload files to iCloud Drive for easy sharing
- Google Drive: Upload files and get shareable links
- macOS 13.0 (Ventura) or later
- Xcode 15.0 or later (for building)
Download the latest release from the Releases page.
-
Clone the repository:
git clone https://github.com/stoimeniliev/shelfmate.git cd shelfmate -
Open the project in Xcode:
open ShelfMate.xcodeproj
-
Build and run (⌘R)
ShelfMate requires Accessibility permissions to detect cursor shake gestures globally. On first launch, you'll be prompted to grant these permissions:
- Go to System Settings → Privacy & Security → Accessibility
- Enable the toggle for ShelfMate
- Start the app: ShelfMate runs in your menu bar (look for the stack icon)
- Create a shelf: Either:
- Start dragging files and rapidly shake your cursor left-right
- Press ⌘⇧D (configurable)
- Click menu bar → New Shelf
- Drop files onto the shelf: Add files from Finder or any app
- Use file actions: Click ⋯ for ZIP, compress, rename, cloud upload
- Share files: Click the share button for AirDrop, Mail, Messages
- Preview files: Press Space for Quick Look
- Drag to destination: Drag files from the shelf to their final location
- Close the shelf: Click X or press Escape
| Shortcut | Action |
|---|---|
| ⌘⇧D | Create new shelf (global) |
| Space | Quick Look preview |
| ⌘A | Select all items |
| ⌘D | Deselect all items |
| ⌘C | Copy files to clipboard |
| ⌘V | Paste files from clipboard |
| Escape | Close shelf |
Click the menu bar icon to:
- Create a new shelf
- Access recent shelves
- View pinned shelves
- Open Settings
- Quit the app
Access settings from the menu bar to configure:
- General: Shake sensitivity, launch at login
- Cloud: iCloud Drive and Google Drive configuration
- Shortcuts: Global keyboard shortcut configuration
ShelfMate supports two cloud storage options:
Works out of the box if you're signed into iCloud:
- Files are uploaded to
iCloud Drive → ShelfMate Uploads - Share via Finder's Share button, iCloud.com, or AirDrop
- Files sync automatically to your other Apple devices
Requires one-time setup:
- Go to Google Cloud Console
- Create a project and enable "Google Drive API"
- Create OAuth 2.0 credentials (choose "Desktop app")
- In ShelfMate, go to Settings → Cloud → Google Drive
- Enter your Client ID and Client Secret
- Click "Start Authentication" and authorize in browser
- Paste the authorization code back into the app
- Now you can upload files and get shareable links!
ShelfMate/
├── ShelfMateApp.swift # App entry point
├── AppDelegate.swift # Menu bar setup, global coordination
├── Core/
│ ├── GlobalEventMonitor.swift # Monitors mouse events globally
│ ├── ShakeDetector.swift # Shake gesture detection algorithm
│ ├── ShelfManager.swift # Manages shelf window lifecycle
│ ├── QuickLookManager.swift # Quick Look preview integration
│ ├── HotkeyManager.swift # Global keyboard shortcuts
│ ├── ShelfHistory.swift # Recent shelves persistence
│ └── EdgeDockManager.swift # Screen edge docking
├── Actions/
│ ├── ShareManager.swift # System share sheet integration
│ ├── FileActions.swift # ZIP, compress, rename operations
│ └── CloudUploadManager.swift # iCloud & Google Drive integration
├── UI/
│ ├── ShelfWindow.swift # Floating NSPanel window
│ ├── ShelfView.swift # Main shelf SwiftUI view
│ ├── FileItemView.swift # Individual file display
│ ├── DropZoneView.swift # Drop target component
│ ├── RenameView.swift # Batch rename dialog
│ └── CloudSettingsView.swift # Settings tabs
└── Models/
├── ShelfItem.swift # File item data model
└── PinnedShelf.swift # Pinned shelf persistence
- Global Event Monitoring: Uses
NSEvent.addGlobalMonitorForEventsto track mouse movements across all apps - Position History: Maintains a rolling history of mouse positions with timestamps
- Direction Analysis: Detects rapid horizontal direction reversals within a time window
- Debouncing: Prevents multiple triggers with a cooldown period
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly on macOS
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Swift conventions and Apple's Human Interface Guidelines
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and concise
- Accessibility permissions must be granted for shake detection to work
- Some applications may not support standard drag-and-drop protocols
- The shelf window might not appear in full-screen applications
- Custom keyboard shortcut to create shelf
- File actions (compress, share, ZIP, rename)
- Multiple shelf support
- Quick Look preview
- Cloud upload with shareable links
- Recent shelves history
- Pinned shelves
- Edge docking
- Custom themes
- OCR text extraction from images
- Image format conversion
- Folder observation (auto-show shelf when files added)
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with ❤️ by Stoimen Iliev
- Built with SwiftUI and AppKit
If you find this project useful, please consider:
- Starring the repository ⭐
- Sharing it with others
- Contributing to the codebase
Made with ❤️ for the macOS community