~whynothugo/shotman

WIP screenshot tool
Use my upstreamed delegate_noop
Update wayland/smithay dependencies

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~whynothugo/shotman
read/write
git@git.sr.ht:~whynothugo/shotman

You can also use your local clone with git send-email.

#shotman

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 with Esc.

shotman is designed to run in response to some global hotkey (e.g.: Super+P, PrintScreen, etc).

#Goals

  • Fast (less than 80ms to render the screenshot window)
  • Simple design (delegates as much as possible to the compositor)

#Requirements

A wayland compositor which support the following is required:

  • wlr_layer_shell
  • wlr_screencopy

Additionally, for taking screenshots of a region, slurp is required.

Currently, sway has been tested, but any wlroots-based compositor should work. Feedback on results for other compatible compositors is most welcome.

#Usage

  • shotman output takes a screenshot of the currently active output.
  • shotman window takes a screenshot of the currently active window (sway-only, not yet implemented).
  • shotman region takes a screenshot of a custom region (not yet implemented).

#Keyboard controls

  • Esc or q: exit, keeping the saved the screenshot
  • Del or d: exit, deleting the screenshot
  • Ctrl+C or XF86Copy: copy the screenshot into the clipboard
  • Ctrl+X or XF86Cut: cut the screenshot file into the clipboard (not implemented)
  • Space: Unfocus screenshot window
  • f: Toggle fullscreen (not implemented)
  • e: Edit image (opens it in GIMP) (still unstable)
  • h,j,k,l: move preview to another corner

Hint: a deleted screenshot will remain in clipboard until something else is copied, or the shotman process is killed.

Note: While the window can be focused with Space, it can only be focused again by hovering with a pointer. Consider closing with Esc it after copying/cutting instead.

#Mouse controls

Not yet implemented

  • Buttons for Done.
  • Buttons for Copy.
  • Buttons for Delete.
  • Dragging the image onto another application drags-and-drops it.

#Touch controls

Not yet implemented

  • Buttons work the same.
  • Swiping the window towards another corner changes the anchor.
  • Swiping the window towards the edge of the screen dismissed it.

#Existing tools

This section is incomplete.

  • No need to LIST them all here, but just list pain points that I'm trying to avoid.
  • Actually, should mention that some tools are great (e.g.: grim), but just don't fit this use case.

#Building

shotman can be built using cargo build --release. The resulting binary will be located in ./target/release/shotman. Copy this into your $PATH.

#Caveats

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.

"shot" can be a metaphor for a shot of a drink. Somehow use that?