shotdock
Wayland screenshot and screen recording tool with window framing and an optional floating dock.
Supports Hyprland, Sway, River, Niri, and other Wayland compositors.
Showcase
| Canvas Background | Window Framing | Floating Dock |
|---|---|---|
Features
- Area & Window Snip: Interactive region selection with window snapping (
slurp). - Window Framing: Rounded corners, Gaussian drop shadow, macOS-style titlebar, and gradient canvas backdrops.
- Offline Framing: Frame existing image files via
shotdock frame <file>. - Screen Freeze: Freeze screen content during area selection (
hyprpicker). - Screen Recording: 60 FPS H.264 video recording with monitor, window, or region selector (
wf-recorder). - OCR Text Extraction: Extract text from screen directly to Wayland clipboard (
tesseract). - Optional Floating Dock: GTK4 LayerShell toolbar for quick visual access.
Quick Start
Installation
yay -S shotdock
CLI Capture
# Snip region or click window
shotdock -a
# Capture window or region with framing
shotdock -w
# Capture focused monitor
shotdock -f
# Extract text to clipboard (OCR)
shotdock -t
# Toggle screen recording
shotdock -r
Installation
shotdock is built with native Wayland protocols and GTK4 layer-shell libraries.
Dependencies
Core Requirements
gtk4>k4-layer-shellgrim&slurpimagemagick(ImageMagick 7 for shadow and canvas pipelines)wl-clipboardlibnotify(notify-send)
Optional Tools
hyprpicker: Freezes screen animations during area snips (--freeze/-z)tesseract&tesseract-data-eng: Optical Character Recognition (-t)wf-recorder: Video screen recording (-r,--record-area)sattyorswappy: Interactive annotation editorrofi: Interactive recording target selection menu
Package Manager Installation
Arch Linux (AUR)
# Using yay
yay -S shotdock
# Using paru
paru -S shotdock
Install recommended optional dependencies on Arch:
sudo pacman -S hyprpicker tesseract tesseract-data-eng wf-recorder swappy rofi
Pre-compiled Binary (Generic Linux x86_64)
Download the standalone tarball from GitHub Releases:
tar -xzf shotdock-v0.1.4-x86_64-linux.tar.gz
sudo install -Dm755 shotdock /usr/local/bin/shotdock
Fedora
sudo dnf install gtk4-devel gtk4-layer-shell-devel grim slurp ImageMagick wl-clipboard libnotify tesseract wf-recorder swappy rofi
Building from Source
Ensure Rust stable is installed:
git clone https://github.com/sirrryasir/shotdock.git
cd shotdock
cargo build --release
sudo install -Dm755 target/release/shotdock /usr/local/bin/shotdock
Cargo Install
Install directly into Cargo’s binary directory:
cargo install --path .
Compositor Keybindings
Example keybindings for Wayland compositors.
Hyprland (hyprland.conf)
# Screenshots
bind = SUPER, P, exec, shotdock -a
bind = SUPER CTRL, P, exec, shotdock -a --freeze
bind = SUPER ALT, P, exec, shotdock -w
bind = , Print, exec, shotdock -p
# Utilities
bind = SUPER CTRL, T, exec, shotdock -t
bind = SUPER, R, exec, shotdock -r
bind = SUPER SHIFT, D, exec, shotdock
# Floating dock blur rules
layerrule = blur, shotdock
layerrule = ignorezero, shotdock
Sway (config)
bindsym $mod+p exec shotdock -a
bindsym $mod+Ctrl+p exec shotdock -a --freeze
bindsym $mod+Alt+p exec shotdock -w
bindsym Print exec shotdock -p
bindsym $mod+Ctrl+t exec shotdock -t
bindsym $mod+r exec shotdock -r
bindsym $mod+Shift+d exec shotdock
Niri (config.kdl)
binds {
Mod+P { spawn "shotdock" "-a"; }
Mod+Ctrl+P { spawn "shotdock" "-a" "--freeze"; }
Mod+Alt+P { spawn "shotdock" "-w"; }
Print { spawn "shotdock" "-p"; }
Mod+Ctrl+T { spawn "shotdock" "-t"; }
Mod+R { spawn "shotdock" "-r"; }
Mod+Shift+D { spawn "shotdock"; }
}
Capture Modes
shotdock provides CLI commands for all capture operations.
1. Area Snip (with Window Snapping)
Interactive selection via slurp. Drag a rectangular box or click on any window to select it:
shotdock -a
Saves the capture to disk and copies it to the Wayland clipboard.
2. Screen Freeze Selection
Freezes screen content during selection using hyprpicker:
shotdock -a --freeze
# or
shotdock -z
3. Window & Region Framing
Captures a window or region and applies 16px rounded corners, Gaussian drop shadow, window titlebar, and canvas background:
shotdock -w
4. Focused Monitor
Captures the currently focused monitor:
shotdock -f
5. All Connected Monitors
Captures a full desktop span across all monitors:
shotdock -p
# or
shotdock --all
6. OCR Text Extraction
Extracts text from a selected area to the clipboard using Tesseract:
shotdock -t
Modifier Flags
| Flag | Description |
|---|---|
-e, --edit | Open capture in editor (satty or swappy) |
--no-edit | Bypass editor |
--no-shadow | Disable drop shadow |
--no-titlebar | Disable window titlebar |
-z, --freeze | Freeze screen during selection |
Examples
# Snip and open in editor
shotdock -a -e
# Framed capture without shadow
shotdock -w --no-shadow
# Framed capture without titlebar
shotdock -w --no-titlebar
Floating Dock
Run shotdock without arguments to open the GTK4 LayerShell dock:
shotdock
Escape: Close dockEnter: Trigger capture for active mode- Click buttons to trigger actions or click gear icon for settings popover
Window Framing & Canvas Themes
shotdock applies rounded corners, drop shadows, window titlebars, and background canvas gradients.
Window Framing
When framing is applied:
- Rounded Corners: 16px anti-aliased corner radius.
- Drop Shadow: Multi-pass Gaussian drop shadow cast evenly on all sides.
- Window Titlebar: Dark mock titlebar with macOS-style window controls.
Capture Commands
# Framed capture (titlebar + shadow + canvas)
shotdock -w
# Framed capture without shadow
shotdock -w --no-shadow
# Framed capture without titlebar
shotdock -w --no-titlebar
Canvas Themes
| Theme | Description |
|---|---|
Transparent | Clean alpha PNG with soft drop shadow |
FollowSystem | Gradient matching active wallpaper palette (Wallbash) |
RealWallpaper | Centers screenshot over blurred desktop wallpaper |
Sunset | Pink to Purple gradient (#f43f5e to #8b5cf6) |
Candy | Vibrant Violet gradient (#ec4899 to #a855f7) |
Breeze | Cyan to Blue gradient (#06b6d4 to #3b82f6) |
Raindrop | Ocean Indigo gradient (#3b82f6 to #6366f1) |
Midnight | Deep Indigo gradient (#1e1b4b to #0f172a) |
Forest | Emerald gradient (#059669 to #10b981) |
White / Black | Minimalist solid backdrops |
Framing Existing Images (shotdock frame)
Frame existing images via CLI:
# Basic framing
shotdock frame screenshot.png
# Frame with custom output file
shotdock frame terminal.png -o docs/terminal_framed.png
# Apply canvas theme
shotdock frame window.png --theme Sunset -o framed_card.png
# Copy framed output directly to clipboard
shotdock frame code.png -c
# Strip titlebar
shotdock frame app.png --no-titlebar --theme Breeze
Screen Recording
shotdock uses wf-recorder for H.264 video recordings.
Recording Profile
Default configuration:
- Codec:
libx264 - Rate control: Constant Rate Factor
crf=18 - Frame rate: 60 FPS (
record_fps) - Pixel format:
yuv420p - Preset:
veryfast
Interactive Target Selection
Trigger screen recording:
shotdock -r
shotdock opens a selection menu (via rofi if installed):
- Display: Choose a monitor to record.
- Window or Area: Click a window or drag a region using
slurp.
To start region recording directly without the menu:
shotdock --record-area
Process Management
- Start: Run
shotdock -r. - Stop: Run
shotdock -ragain. - Signal:
wf-recorderis sentSIGINTto cleanly finalize the MP4 container. - Clipboard: File path to the
.mp4is copied to clipboard. - Default Directory:
~/Videos/Recordings/. - PID File: Tracked in
$XDG_RUNTIME_DIR/shotdock/record.pid.
Optical Character Recognition (OCR)
Extract plain text directly from any screen region into your Wayland clipboard.
Usage
- Trigger OCR mode via the floating dock or CLI:
shotdock -t - Drag a rectangular selection over any on-screen text, terminal buffer, error dialog, or image.
- The extracted text is immediately written to your Wayland clipboard (
wl-clipboard) and an interactive notification displays a preview of the recognized text.
Configuration
Configure the language model in ~/.config/shotdock/config.json:
{
"ocr_lang": "eng"
}
The language code matches Tesseract dataset codes (e.g., eng, deu, fra, spa, jpn).
Dependencies
tesseract: The OCR enginetesseract-data-eng: English language trained data (or language pack of your choice)wl-clipboard: Wayland clipboard tool (wl-copy)
Configuration Reference
The configuration file is located at ~/.config/shotdock/config.json:
{
"show_cursor": false,
"freeze": false,
"window_shadow": true,
"macos_titlebar": true,
"canvas_theme": "Transparent",
"timer_seconds": 0,
"save_to_disk": true,
"copy_to_clipboard": true,
"open_in_editor": false,
"save_dir": "~/Pictures/Screenshots",
"editor": null,
"ocr_lang": "eng",
"studio_quality": true,
"record_fps": 60
}
Schema
show_cursor(boolean): Include mouse cursor in screenshots. Defaultfalse.freeze(boolean): Freeze screen animations during snip viahyprpicker. Defaultfalse.window_shadow(boolean): Render 16px rounded corners and Gaussian drop shadow. Defaulttrue.macos_titlebar(boolean): Add dark mock titlebar with window controls. Defaulttrue.canvas_theme(string): Background canvas preset. Default"Transparent".timer_seconds(number): Countdown delay in seconds before capture (0, 3, 5, 10). Default0.save_to_disk(boolean): Write screenshot PNG tosave_dir. Defaulttrue.copy_to_clipboard(boolean): Copy screenshot PNG to Wayland clipboard. Defaulttrue.open_in_editor(boolean): Immediately launch annotation editor after capture. Defaultfalse.save_dir(string): Directory path for saved screenshots (supports~/).editor(string or null): Custom editor binary (e.g."satty"or"swappy"). Default auto-detectssattythenswappy.ocr_lang(string): Tesseract OCR language model code. Default"eng".studio_quality(boolean): Enable 60 FPS visually lossless H.264 recording profile (CRF 18). Defaulttrue.record_fps(number): Target framerate for video recording. Default60.
Canvas Themes
"Transparent": Alpha PNG with soft drop shadow."FollowSystem": Dynamic gradient matching desktop wallpaper palette (Wallbash)."RealWallpaper": Screenshot centered over blurred desktop wallpaper."White"/"Black": Solid studio backdrops."Sunset": Pink to purple gradient (#f43f5eto#8b5cf6)."Candy": Violet gradient (#ec4899to#a855f7)."Breeze": Cyan to blue gradient (#06b6d4to#3b82f6)."Raindrop": Blue to indigo gradient (#3b82f6to#6366f1)."Midnight": Deep dark indigo gradient (#1e1b4bto#0f172a)."Forest": Emerald to green gradient (#059669to#10b981).