A lightweight macOS command-line application that displays images in always-on-top floating windows, perfect for keeping reference images visible while working.
- Always on top: Images stay pinned above all other windows, even when focus changes
- Borderless design: Clean, minimal interface without window decorations
- Modern UI controls: Transparent buttons with contemporary styling
- Proportional resizing: Maintains image aspect ratio during resize operations
- Multiple images: Open several images simultaneously using wildcards
- Transparency control: Adjust window opacity with mouse wheel scrolling
- Keyboard shortcuts: Press 'q' to close windows quickly
- Independent process: Runs detached from the terminal for uninterrupted workflow
-
Clone this repository
-
Build the application:
swift build -c release
-
Make the shell script executable:
chmod +x pin.sh
./pin.sh /path/to/image.jpg./pin.sh *.jpg
./pin.sh Images/*.png
./pin.sh ~/Pictures/screenshots/Screen*.pngAny image format supported by macOS (JPEG, PNG, GIF, TIFF, BMP, etc.)
- Drag anywhere: Move the window
- X button (top-right): Close window
- Grip handle (bottom-right): Resize window (maintains aspect ratio)
- Mouse wheel: Adjust window transparency (scroll up = more opaque, scroll down = more transparent)
- q: Close the current window
- Built with Swift and Cocoa
- Uses
NSWindow.Level.floatingfor always-on-top behavior - Borderless window design (
styleMask: [.borderless]) - Independent process execution via
nohup - Proportional resizing maintains original image aspect ratios
- Transparency range: 10% to 100% opacity
- Design Reference: Keep UI mockups, color palettes, or design specs visible while coding
- Photo Editing: Compare before/after images side by side
- Documentation: Pin screenshots or diagrams while writing
- Art/Drawing: Reference images for digital art or sketching
- Development: Keep API documentation, wireframes, or flowcharts accessible
- macOS 10.12+ (Sierra or later)
- Xcode command line tools or Swift toolchain
MIT License - Feel free to use, modify, and distribute.
Pull requests and issues welcome! Please ensure all changes maintain the minimalist design philosophy and cross-platform compatibility within the macOS ecosystem.