Add hint for potential performance improvement
Tidy up handling of configure/focus events
Exit if both saving AND thumbnail fail
Source | Issues | Patches | Chat
The uncompromising screenshot GUI for Wayland compositors.
shotman takes a screenshot and shows it in a small floating thumbnail window.
The screenshot can then copied with
ctrl+c, deleted with
d, or dismissed
shotman is designed to run in response to some global hotkey (e.g.:
PrintScreen, etc). It is designed for interactive usage.
Building from source requires:
Note that slightly older Rust and libxkcommon versions may work, they are merely untested.
It is recommended to build by cloning the git repository, so the right version
is extracted from version control. Otherwise, set
A wayland compositor which support the following is required:
Additionally, for taking screenshots of a region,
slurp>=1.4.0 is required.
Taking screenshots of the currently active window works only on
sway has been tested, but any wlroots-based compositor should
work (except for the
window command, as mentioned above). Feedback on results
for other compatible compositors is most welcome.
When building, an additional binary is compiled. This binary can generate shell completions for commons shells. It can be used via:
./target/release/shotman_completions zsh ./target/release/shotman_completions bash ./target/release/shotman_completions fish
Packagers are encouraged to ship the completions themselves, but not the binary (since it serves no additional purpose).
shotman --target=outputtakes a screenshot of the currently active output.
shotman --target=windowtakes a screenshot of the currently active window (sway-only).
shotman --target=regiontakes a screenshot of a custom region (requires slurp).
--copy parameter may be specified to automatically copy the screenshot
into the clipboard.
q: exit/quit, keeping the saved the screenshot
d: deleting/discard the screenshot and exit
XF86Copy: copy the screenshot into the clipboard
XF86Cut: cut the screenshot file into the clipboard
Space: Unfocus screenshot window
f: Toggle fullscreen (not implemented)
e: Edit image (see below for details) (still unstable)
l: move preview to another corner
Hint: a deleted screenshot will remain in clipboard until something else is
copied to the clipboard, or the
shotman process is killed.
Hint: when copying a screenshot and closing
shotman, it will continue running
in the background to hold the clipboard. It will exit automatically when the
another application takes over the clipboard.
Note: While the window can be focused with
Space, it can only be focused
again by hovering with a pointer. Consider closing it with
Not yet implemented
Not yet implemented
The intent of touch-based controls is for this UI to be usable on tables and phones.
gimp will be used to edit a screenshot. This can be overridden by
IMAGE_EDITOR environment variable. E.g.:
shotman can be built using
cargo build --release. The resulting binary will
be located in
./target/release/shotman. Copy this into your $PATH.
A recommended sway configuration is:
bindsym $super+p exec shotman --target=window bindsym $super+Shift+p exec shotman --target=region bindsym $super+Ctrl+p exec shotman --target=output
Only a few common buffer formats are supported. Saving the PNG screenshot will fail for other formats. I'm not sure that any compositor implements screencopy and could return another format. If so, please report the issue.
This section is incomplete.
grim: works great, but is a lower-level cli tool. It also saves to a file, so getting that back onto the screen is slower since it requires an entire encoding -> decoding round trip. I still recommend this for scripted usage or scenarios where the thumbnail is not required.
grimshot: same as above.
swappy: doesn't save the file by default. Slow to start up and in general. The editor is pretty good. It's worth considering as an editor for the
flameshot: doesn't work on wayland?.
spectacle: mentions it works on "non-KDE X11", but nothing about wayland (not: haven't tried it).
This section is incomplete.
IMAGE_EDITORenvironment variable (see README for further details).
--verboseflag now takes a named log level (e.g.:
single-pixel-buffer-v1protocol is now used to render single-pixel buffers. Only compositors with compatible with this protocol are supported.
text/uri-list. File managers and other applications will paste by copying the file directly. This works on
dolphin, and does not work on
nemo. Cutting file is not possible on Wayland, so this new behaviour does not apply when cutting.
There's no changelog for prior versions; this was too experimental.
shotman is licensed under the ISC licence. See LICENCE.md for details.