Floating Shelf: a macOS shelf at the edge of the screen for holding files, images and text while you move between apps.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-floating-shelf.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-floating-shelf.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-floating-shelf.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add MIT License 76c5d29 1 year ago History
README.md

Floating Shelf

A macOS utility that provides a temporary "shelf" for dragging and storing files, images, and text. Perfect for holding items while you work with multiple windows and apps.

Floating Shelf Screenshot

Features

  • Edge Detection: Drag items to the edge of your screen to automatically reveal the floating shelf
  • Menu Bar Access: Click the shelf icon in your menu bar to toggle the window
  • Drag In & Out: Drop files/images onto the shelf, then drag them back out to upload or use elsewhere
  • Upload Support: Drag images from the shelf directly to browser upload fields
  • Quick Copy: Double-click any item to copy it to your clipboard
  • File Preview: See thumbnails of images and file icons
  • Context Menu: Right-click items for more options (Open, Show in Finder, Remove)
  • Always Available: Floats above all windows and stays visible across all spaces

How to Use

  1. Show the Shelf:
  • Drag any file/image/link to the edge of your screen (left, right, or top edge)
  • The shelf will automatically appear when you drag content near the edge
  • OR click the shelf icon in your menu bar to toggle it manually
  1. Add Items:
  • Drag and drop files, images, or text onto the shelf window
  • Works with images from Safari, Firefox, Chrome, and other browsers
  1. Use Items:
  • Drag items from the shelf to other apps (works with browser upload fields!)
  • Double-click to copy to clipboard
  • Right-click for more options (Open, Show in Finder, etc.)
  1. Clear Items:
  • Click the trash icon to clear all items
  • Right-click individual items and select "Remove"

Building from Source

Requirements

  • macOS 13.0 (Ventura) or later
  • Xcode 14.0 or later
  • Swift 5.0 or later

Build Instructions

  1. Clone or download this repository
  1. Open the project:
   cd dbbasic-floating-shelf
   open FloatingShelf.xcodeproj
  1. Build and run:
  • Select "FloatingShelf" scheme in Xcode
  • Press Cmd + R to build and run
  • Or use Product > Build (Cmd + B)

Alternative: Build from Command Line

xcodebuild -project FloatingShelf.xcodeproj -scheme FloatingShelf -configuration Release build

The built app will be located at:

build/Release/FloatingShelf.app

Installation

  1. Build the app using the instructions above
  2. Copy FloatingShelf.app to your /Applications folder
  3. Launch the app
  4. The shelf icon will appear in your menu bar

Note on Permissions

This app uses invisible edge windows to detect drag operations. No special accessibility permissions are required!

Technical Details

  • Built with Swift and SwiftUI
  • Uses invisible edge windows for drag detection
  • Implements native drag-and-drop APIs
  • Borderless floating window with blur effect
  • Runs as menu bar app (no dock icon)

Architecture

  • FloatingShelfApp.swift: Main app entry point and edge window setup
  • EdgeDetectorWindow.swift: Invisible edge windows for drag detection
  • FloatingShelfWindow.swift: Window management and positioning
  • ShelfViewController.swift: Data management and drag-drop handling
  • ShelfItem.swift: Item model with clipboard support
  • ShelfView.swift: SwiftUI interface and visual design

License

MIT License - see LICENSE file for details.

Free for personal and commercial use. Created for dbbasic.com

Future Ideas

Potential Merge with Paste History

This shelf app is essentially a visual, spatial representation of the macOS pasteboard. It could be merged with a clipboard history tool to create a unified "clipboard workspace":

  • Drag items to shelf → automatically saved to paste history
  • Copy items → appear in both history and shelf
  • Pin items from history to keep in shelf
  • See both active working items (shelf) and recent copies (history)

This would be closer to what Xerox PARC likely envisioned for copy/paste in the 1970s - a visual, multi-item clipboard space - but was limited by hardware constraints of the era. We're finally able to implement the natural evolution of clipboard functionality that was always intended.

Credits

Inspired by apps like Dropover and Dragondrop. Built to provide a free, open-source alternative for the macOS community.