A native, blazing-fast 🚀🚀🚀 area selection tool for wlroots based compositors such as sway and river.
NOTE: Run waysip --help for the full list of flags and options.
Interactive rectangular area (prints position and size using the default format):
waysip -dPick a single point:
waysip -pPrint information about the focused screen:
waysip -iSelect a display output:
waysip -oCombined dimensions / output mode (single click selects an output; drag selects a region):
waysip -d -oRestrict selection to predefined boxes (pipe one box per line: x,y WIDTHxHEIGHT):
printf '100,200 400x300\n' | waysip -rCustom output format (see % placeholders in --help; default is %x,%y %wx%h\n):
waysip -d -f '%x %y %w %h\n'Shell completions:
waysip --completions fish | source
waysip --completions zsh > ~/.zfunc/_waysip
waysip --completions bash > /etc/bash_completion.d/waysip
waysip --completions elvish >> ~/.config/elvish/rc.elv
waysip --completions pwsh >> $PROFILE
waysip --completions nushell | save -f ~/.config/nushell/completions/waysip.nuAll features except benchmark are enabled in the default build. To reduce binary size or compile-time dependencies, features can be selectively disabled:
cargo build --no-default-features --features frame-limiter
cargo build --no-default-features --features logger
cargo build --no-default-features --features completions
cargo build --no-default-features --features frame-limit,logger,completions| Feature | What it adds | Extra dependency |
|---|---|---|
frame-limit |
Workaround to fix frametime issue on low frequency CPUs | None |
logger |
--log-level flag, tracing output to stderr |
tracing-subscriber |
completions |
--completions <SHELL>, generate shell completion scripts |
clap_complete (+ nushell) |
benchmark |
Benchmarking options for development described here | None |
- rustup (Rust toolchain)
- pkg-config
- wayland
- cairo
- pango
git clone https://github.com/waycrate/waysip && cd waysipcargo build --releasesudo mv ./target/release/waysip /usr/local/bin
This repository provides a Nix flake for building and running waysip.
nix build github:waycrate/waysipnix run github:waycrate/waysipTo enable benchmarking options use one of those options depending on usecase described later:
cargo build --no-default-features --features "logger completions benchmark"
cargo build --no-default-features --features "logger completions frame-limit benchmark"Regarding frame-limit feature. It is a workaround enabled by default meant to solve issue with unstable frametime on low freq CPUs or under heavy load.
Records each wl_callback.done timestamp from the compositor for the focused screen (duplicate timestamps are dropped, so it's roughly one entry per frame) and prints frame stats on stderr when the selection ends.
Reported metrics (written to stderr):
fps avgframetime: min / avg / maxlatencies- array of entries meant track where frametime issues happened
For drag modes the raw duration and the amount trimmed from each end are also printed.
For non-drag options less frames-better.
To test frametime stability try lowering your cpu freq to 0.8 GHz and build without frame-limit feature before testing.