LinuxCommandLibrary

i3-scrot

Take screenshots in i3 window manager

TLDR

Capture a screenshot of the whole screen and save it to the default directory

$ i3-scrot
copy

Capture a screenshot of the active window
$ i3-scrot --window
copy

Capture a screenshot of a specific rectangular selection
$ i3-scrot --select
copy

Capture a screenshot of the whole screen and copy it to the clipboard
$ i3-scrot --desk-to-clipboard
copy

Capture a screenshot of the active window and copy it to the clipboard
$ i3-scrot --window-to-clipboard
copy

Capture a screenshot of a specific selection and copy it to the clipboard
$ i3-scrot --select-to-clipboard
copy

Capture a screenshot of the active window after a delay of 5 seconds
$ i3-scrot --window [5]
copy

SYNOPSIS

i3-scrot is not a standard binary but a common community script. Its exact syntax can vary.
A typical synopsis based on common implementations is:
`i3-scrot [OPTION...]`

Common usage examples:
`i3-scrot -f` (Full screen)
`i3-scrot -w` (Active window)
`i3-scrot -s` (Select region)
`i3-scrot -fwc` (Full screen, copy to clipboard, send notification)

PARAMETERS

-f, --full
    Captures the entire screen.

-w, --window
    Captures the currently active window.

-s, --select
    Allows the user to interactively select a region to capture (e.g., using slop or grim-shot).

-c, --clipboard
    Copies the resulting image or its path to the system clipboard (requires xclip or wl-copy).

-n, --notify
    Displays a desktop notification upon successful screenshot capture (requires dunst or notify-send).

-d N, --delay N
    Delays the screenshot capture by N seconds. Useful for capturing menus or tooltips.

-o DIR, --output DIR
    Specifies an alternative output directory for saving the screenshot.

DESCRIPTION

i3-scrot is a popular community-driven script designed to streamline the screenshot process within the i3 Window Manager environment.
It typically acts as a wrapper around a core screenshot utility like scrot, maim, or grim, adding features crucial for a seamless i3 workflow.
Common functionalities include taking full-screen screenshots, capturing the active window, or allowing interactive selection of a region.
Beyond just capturing, i3-scrot scripts often automatically save the image to a predefined directory (e.g., ~/Pictures/Screenshots/ with a timestamped filename), copy the image path or the image data directly to the system clipboard (using tools like xclip or wl-copy), and provide visual or audio notifications upon successful capture (via dunst or notify-send).
Its primary purpose is to provide a single, easily bindable command in i3's configuration to perform comprehensive screenshot actions with minimal user intervention.

CAVEATS

The `i3-scrot` command is typically a user-created or community-maintained script, not a standard executable distributed with core Linux utilities or i3 itself.
As such, its exact functionality, available options, and dependencies can vary significantly between different implementations.
Users often customize these scripts to fit their specific needs and preferred screenshot tools (e.g., scrot, maim, grim) and helper utilities (e.g., xclip, dunst, slop).
Always consult the specific script's source code or documentation if you encounter unexpected behavior or need to understand its precise options.

TYPICAL I3 CONFIGURATION

To use `i3-scrot`, it is commonly bound to a key combination in the i3 configuration file (typically ~/.config/i3/config).
For example, to take a full-screen screenshot when pressing `Print Screen` and save it with a timestamp:
`bindsym Print exec --no-startup-id i3-scrot -f`

Or to select a region with `Shift+Print Screen` and copy to clipboard:
`bindsym Shift+Print exec --no-startup-id i3-scrot -sc`

Ensure the i3-scrot script is executable and located in your system's `PATH` (e.g., ~/bin/ or /usr/local/bin/).

DEPENDENCIES

The functionality of i3-scrot heavily relies on several external utilities. Common dependencies include:

Screenshot Tools: scrot, maim, or grim (for Wayland).
Clipboard Tools: xclip (for X11) or wl-copy (for Wayland).
Notification Daemons: dunst or notify-send.
Selection Tools: slop, xrectsel, or grim-shot for interactive region selection.

HISTORY

The concept of i3-scrot emerged organically within the i3 Window Manager community.
As users adopted i3 for its lightweight and tiling nature, a common need arose for a quick, keyboard-driven way to take screenshots that integrated well with the desktop environment.
Instead of a single, officially maintained binary, users began crafting shell scripts that wrapped existing screenshot tools like scrot, adding features like automatic saving, clipboard integration, and desktop notifications.
These scripts, often shared on forums, GitHub gists, or dotfiles repositories, converged on similar naming conventions and functionalities, with i3-scrot becoming a de facto standard name for such a utility.

SEE ALSO

scrot(1), maim(1), grim(1), xclip(1), wl-copy(1), dunst(1), notify-send(1), i3(1)

Copied to clipboard