openSUSE / openSUSEway

dotfiles for Sway on openSUSE
MIT License
82 stars 17 forks source link

Add screenshot mode menu #131

Closed FilippoBonazziSUSE closed 5 months ago

FilippoBonazziSUSE commented 5 months ago

This adds a screenshot mode menu instead of the individual screenshot options. The mode menu can be opened with $mod+Print and displays this text:

Screenshot: (f) full, (s) select window, (a) select area, (w) focused window, (o) focused output [Ctrl+ saves to clipboard]

The text is a bit long, and might not display fully in the bar depending on leftover space. Hovering over the menu text displays a tooltip with the full text, however.

The options should be quite intuitive.

Pressing <option> saves the screenshot into a timestamped file name in $GRIM_DEFAULT_DIR [...]. If $GRIM_DEFAULT_DIR is not set, it falls back first to $XDG_PICTURES_DIR and then to the current working directory (from man grim).

Pressing Ctrl+<option> writes the screenshot to the clipboard instead.