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.

Add it to your layout with screenshot:

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

General ​

FieldTypeDefaultDescription
iconstring"ld-camera-symbolic"Bar button icon.
output-directorystring""Output directory for screenshots. Empty uses the XDG Pictures directory.
filename-formatstring"Screenshot_%Y-%m-%d_%H-%M-%S.png"Saved file name, formatted with chrono/strftime specifiers.
copy-to-clipboardbooltrueCopy the captured image to the clipboard.
notifybooltrueShow a desktop notification after capturing.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
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
    border-show: false
    border-color: accent
    icon-show: 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.