LinuxCommandLibrary

spectacle

Capture desktop screenshots

TLDR

Capture a screenshot of the entire desktop

$ spectacle
copy

Capture a screenshot of the active window
$ spectacle [[-a|--activewindow]]
copy

Capture a screenshot of a specific region
$ spectacle [[-r|--region]]
copy

Start another Spectacle instance so that you can screenshot Spectacle itself
$ spectacle [[-i|--new-instance]]
copy

SYNOPSIS

spectacle [OPTIONS]

PARAMETERS

-v, --version
    Displays version information about Spectacle.

-h, --help
    Displays a concise help message with available command-line options.

--fullscreen
    Captures a screenshot of the entire desktop across all connected screens.

--activewindow
    Takes a screenshot of the currently active (focused) window.

--currentscreen
    Captures a screenshot of the screen where the Spectacle window is currently located or the primary screen if run in background mode.

--region
    Activates a mode allowing the user to select a specific rectangular region of the screen to capture interactively.

--rect <x,y,w,h>
    Takes a screenshot of a specific rectangular area defined by its top-left coordinates (x,y) and its width (w) and height (h) in pixels. This is a non-interactive capture.

--delay <seconds>
    Sets a delay in seconds before the screenshot is actually taken. Useful for preparing the screen content.

--output <file>
    Saves the captured screenshot directly to the specified file path without opening the Spectacle GUI.

--background
    Runs Spectacle in a background mode, taking the screenshot immediately based on other options (e.g., --fullscreen, --activewindow) and saving it to file or clipboard without showing the UI.

--nonotify
    Prevents Spectacle from displaying a notification after a screenshot has been successfully taken.

--pointer
    Includes the mouse pointer in the captured screenshot.

--no-decoration
    When capturing windows (e.g., with --activewindow), this option excludes the window's title bar and borders from the screenshot.

--new-instance
    Starts a completely new instance of Spectacle, even if another instance is already running.

--minimized
    Starts Spectacle minimized directly to the system tray, without opening its main window.

--save-dialog
    Immediately shows the 'Save As' dialog after taking a screenshot, instead of performing a default action (like copying to clipboard or saving to a default location).

--clipboard
    Copies the captured screenshot directly to the system clipboard, making it available for pasting into other applications.

--screenshot-mode <mode>
    Sets the screenshot capture mode. Available modes include "fullscreen", "active-window", "current-screen", and "region".

--launch-mode <mode>
    Sets how Spectacle is launched. Available modes include "default" (normal UI), "interactive" (allows user selection), and "background" (takes shot without UI).

--no-debug-log
    Disables the output of debug information, useful for suppressing verbose logging.

DESCRIPTION

Spectacle is the default screenshot utility for the KDE Plasma desktop environment. It allows users to easily capture various types of screenshots, including the entire desktop, active windows, specific screens, or user-defined rectangular regions. It provides options for delayed captures, inclusion of the mouse pointer, and the ability to exclude window decorations. Spectacle integrates seamlessly with the KDE environment, offering features like direct saving to file, copying to clipboard, and basic annotation tools within its graphical user interface.

While primarily a GUI application, it can be invoked from the command line with options to automate specific screenshot tasks, making it a versatile tool for both interactive and script-based use cases. Its ease of use and rich feature set make it a go-to tool for capturing visual content on KDE systems.

CAVEATS

Spectacle is primarily designed for the KDE Plasma desktop environment. While it might be installed on other Linux distributions, its full feature set and seamless integration are best experienced within KDE. Command-line options facilitate automation, but advanced features like in-app annotation are only accessible through its graphical user interface. Users on non-KDE environments might find alternative screenshot tools more suitable or require installing significant KDE dependencies.

<I>CLIPBOARD AND FILE INTEGRATION</I>

Spectacle offers seamless integration with the system clipboard, allowing users to copy screenshots directly without saving them to a file. It also supports saving screenshots to various common image formats like PNG, JPEG, and BMP, with options to specify the output directory and filename directly from its UI or via command-line options like --output.

<I>WAYLAND SUPPORT</I>

A significant advancement for Spectacle was its robust support for the Wayland display server protocol. Unlike many older X11-centric screenshot tools, Spectacle is designed to function correctly and efficiently in modern Linux desktop environments that utilize Wayland, ensuring compatibility and performance in contemporary setups.

HISTORY

Spectacle emerged as the successor to KDE's ksnapshot application, becoming the default screenshot utility for KDE Plasma 5.4 (released in August 2015) and subsequent versions. Its development aimed to provide a more modern, intuitive interface and improved functionality, notably including better support for the Wayland display server and integrated annotation tools. It continues to be actively maintained as part of the KDE Applications suite, evolving with the Plasma desktop itself.

SEE ALSO

scrot(1), gnome-screenshot(1), xwd(1), import(1)

Copied to clipboard