Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

slurp

> 开发工具
Open source

Select a region in a Wayland compositor

1.3K stars0 likes1 views
WebsiteGitHub

About

Select a region in a Wayland compositor

slurp

Select a region in a Wayland compositor and print it to the standard output. Works well with grim.

Join the IRC channel: #emersion on Libera Chat.

Building

Install dependencies:

  • meson
  • wayland
  • cairo
  • libxkbcommon
  • scdoc (optional: man pages)

Then run:

bash
git clone https://github.com/emersion/slurp
cd slurp
meson setup build
ninja -C build
build/slurp

Example usage

Select a region and print it to stdout:

bash
slurp

Select a single point instead of a region:

bash
slurp -p

Select an output and print its name:

bash
slurp -o -f "%o"

Select a window under Sway, using swaymsg and jq:

bash
swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp

Select a window without border under Sway, using swaymsg and jq:

bash
swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x+.window_rect.x),\(.rect.y+.window_rect.y) \(.window_rect.width)x\(.window_rect.height)"' | slurp

Contributing

Either send GitHub pull requests or send patches on the mailing list.

License

MIT

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ccliscreenshotwayland

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具