Skip to content

Add screenshot-tile action#3731

Open
bennypowers wants to merge 2 commits intoniri-wm:mainfrom
bennypowers:screenshot-decorations
Open

Add screenshot-tile action#3731
bennypowers wants to merge 2 commits intoniri-wm:mainfrom
bennypowers:screenshot-decorations

Conversation

@bennypowers
Copy link
Copy Markdown

@bennypowers bennypowers commented Mar 29, 2026

Summary

  • Adds a new screenshot-tile action that captures a window with its compositor-drawn decorations (border, focus ring, shadow, rounded corner clipping) and alpha transparency
  • Mirrors the existing screenshot-window action's options (write-to-disk, show-pointer, --id, path)
  • Consistent with the existing window-tile distinction in IPC (e.g. tile_size vs window_size)

Usage

Config keybind:

screenshot-tile

IPC:

niri msg screenshot-tile

Test plan

  • screenshot-window behavior is unchanged
  • screenshot-tile includes border when border is configured
  • screenshot-tile includes focus ring for focused windows
  • screenshot-tile includes shadow when shadow is enabled
  • screenshot-tile includes rounded corner clipping with alpha transparency
  • screenshot-tile --id variant works
  • Fullscreen windows skip border/shadow as expected (matching visual state)
  • Falls back to bare window when tile is not found (e.g. during drag-and-drop)

Ref: #3283

Add an `include-decorations` boolean flag to `screenshot-window` that
renders the window with its compositor-drawn decorations (border, focus
ring, shadow, rounded corner clipping) and alpha transparency.

When enabled, the screenshot is rendered through the tile's full
decoration pipeline rather than just the bare window surface. This
produces a PNG with the window as it appears on screen, including
transparent regions behind rounded corners and drop shadows.

The option defaults to false, preserving existing behavior.

Ref: niri-wm#3283

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@YaLTeR
Copy link
Copy Markdown
Member

YaLTeR commented Mar 29, 2026

I think instead of a flag, it should be a separate action screenshot-tile. We have the window-tile distinction elsewhere in IPC so it would be consistent.

Per review feedback from YaLTeR: use a separate `screenshot-tile`
action rather than an `include-decorations` flag on `screenshot-window`.
This is consistent with the existing window-tile distinction in the IPC
(e.g. `tile_size` vs `window_size` in window info).

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bennypowers bennypowers changed the title screenshot-window: add include-decorations option Add screenshot-tile action Mar 29, 2026
@bennypowers
Copy link
Copy Markdown
Author

Пожалуйста

@Sempyos Sempyos added area:config Config parsing, default config, new settings area:ipc niri msg, niri IPC, D-Bus, scripting pr kind:feature New features and functionality labels Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:config Config parsing, default config, new settings area:ipc niri msg, niri IPC, D-Bus, scripting pr kind:feature New features and functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants