Skip to content

screenshot ​

Screenshot capture button.

Click the bar button to capture a region, output, or window. Controllable from the CLI / RPC socket: lys-shell screenshot region|output|window.

After a capture a thumbnail floats in a screen corner: click it to mark the image up (crop, arrow, rectangle, ellipse, freehand, text, highlighter, numbered markers and pixelation, with undo and redo; Enter saves over the file and copies it, Ctrl+S saves a copy elsewhere), drag it into an app, or delete the capture with its close button.

lys-shell screenshot text copies the text in a dragged region (Latin script, drawn in the UI's fonts or the installed default ones) and lys-shell screenshot qr decodes the QR code in one; neither saves a file.

Add it to your layout with screenshot:

yaml
bar:
  layout:
    - monitor: "*"
      right: [screenshot]

General ​

FieldTypeDefaultDescription
iconstring"ld-camera-symbolic"Bar button icon.
output-directoryDirectory""Output directory for screenshots. Empty uses the XDG Pictures directory.
filename-formatScreenshotFilename"Screenshot_%Y-%m-%d_%H-%M-%S.png"Saved file name, formatted with chrono/strftime specifiers. {counter} numbers the files 1, 2, 3 and on, one past the highest number already saved under the same name; a name without it gets -2, -3 and on when it is taken.
copy-to-clipboardbooltrueCopy the captured image to the clipboard.
notifybooltrueShow a desktop notification after capturing. With the thumbnail disabled it carries Edit, Open folder and Delete buttons.
thumbnail-msu325000How long, in milliseconds, the floating thumbnail stays after a capture; hovering it pauses the countdown. Click it to annotate, drag it into an app, or delete the capture from it. Set to 0 to disable.
thumbnail-positionScreenshotCorner"bottom-right"Screen corner the floating thumbnail sits in.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
tooltipbooltrueShow the module's state in a tooltip on hover.
labelstring""Static label text shown beside the icon.
label-showboolfalseDisplay label.
label-max-lengthu320Max label characters before truncation with ellipsis. Set to 0 to disable.

Colors ​

FieldTypeDefaultDescription
border-colorColorValue"accent"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"accent"Icon container background color token.
label-colorColorValue"fg-default"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions ​

FieldTypeDefaultDescription
left-clickClickAction"lys-shell screenshot region"Action on left click. Default captures a region.
right-clickClickAction"lys-shell screenshot output"Action on right click. Default captures the focused output.
middle-clickClickAction"lys-shell screenshot window"Action on middle click. Default captures the active window.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.

Default configuration ​

yaml
modules:
  screenshot:
    icon: ld-camera-symbolic
    output-directory: ""
    filename-format: Screenshot_%Y-%m-%d_%H-%M-%S.png
    copy-to-clipboard: true
    notify: true
    thumbnail-ms: 5000
    thumbnail-position: bottom-right
    border-show: false
    border-color: accent
    icon-show: true
    tooltip: true
    icon-color: auto
    icon-bg-color: accent
    label: ""
    label-show: false
    label-color: fg-default
    label-max-length: 0
    button-bg-color: bg-surface-elevated
    left-click: lys-shell screenshot region
    right-click: lys-shell screenshot output
    middle-click: lys-shell screenshot window
    scroll-up: ""
    scroll-down: ""

Released under the MIT License.