A screen selection tool for wayland compositors using the layer shell. I thank slurp for teaching me how to use the layer shell and for showing an approach to creating a screen selection tool.
- Customizable (colors, sizes, fonts etc.)
- Screen Freeze (-z flag)
- Screenshot (-s flag)
- Execute arbitrary command (--cmd flag), usable when freezing screen
- Show Coordinates and Dimensions (-t flag)
- Alter selection after performing an initial selection (-A flag)
- Touch Support (needs testing)
- Force aspect ratio (-a flag)
- Select certain regions of screen (e.g. windows) (-r flag)
- Hyprland support (-r hyprland)
- Sway support (-r sway)
- Arbitrary (via argument) (-r arg -R 'X,Y WxH X1,Y1 W1xH1 ...')
- Select whole outputs (-p flag)
This program is available through the AUR, you can install it using an AUR helper like yay:
yay -S samurai-select
or manually:
git clone https://aur.archlinux.org/samurai-select-git
cd samurai-select
makepkg -si
If you have the dependencies listed under Build installed you can just install this program without having the source code by calling
go install github.com/Samudevv/samurai-select@latest
ln -s $GOPATH/bin/samurai-select $GOPATH/bin/smel
To build it you need to have a go compiler, C compiler (for cgo) and the following dependencies installed:
On Arch Linux you can install these dependencies like so:
sudo pacman -S --needed go gcc wayland cairo
Then call this to build it:
go build -v
Or this to install it:
go install -v
To build the man page:
- Install
scdoc
andgzip
- Execute:
scdoc < manpage.scd | gzip -c > samurai-select.1.gz
- View it:
man -l samurai-select.1.gz