skip to content
MusesΜοῦσαιdocs

basics / 02 of 13

Installing

stochos is one binary. Releases cover Linux on x86_64 and macOS on Apple Silicon, and Cargo or Nix builds it for anything else.

Requirements

  • On Wayland, a compositor with wlr-layer-shell and wlr-virtual-pointer. The first draws the grid over everything, the second clicks. Hyprland and Sway have both. Hint mode’s screenshots also need wlr-screencopy.
  • On X11, the XTest extension, which stochos clicks through.
  • On macOS, Accessibility permission. stochos asks for it on its first run. See macOS permissions.

Install script

shell
curl -fsSL https://raw.githubusercontent.com/museslabs/stochos/main/install.sh | sh

The script downloads the latest release for your system into /usr/local/bin, with sudo if that folder needs it. Set INSTALL_DIR to put it somewhere else, and name a tag to install that release instead of the latest:

shell
curl -fsSL https://raw.githubusercontent.com/museslabs/stochos/main/install.sh | INSTALL_DIR="$HOME/.local/bin" sh -s v1.0.0

Cargo

shell
cargo install stochos

On Linux, Cargo builds the Wayland and X11 backends both, and needs the Wayland and xkbcommon headers:

shell
# Debian and Ubuntu
sudo apt install libwayland-dev libxkbcommon-dev

To build one backend only:

shell
cargo install stochos --no-default-features --features wayland
cargo install stochos --no-default-features --features x11

Nix

shell
nix profile install github:museslabs/stochos

The flake also has a Home Manager module, which installs stochos and writes its config from Nix:

home.nix
{
  imports = [ inputs.stochos.homeModules.default ];

  programs.stochos = {
    enable = true;
    settings = {
      grid.target_cell_size = 90;
      hint.auto_click = true;
    };
  };
}

settings is config.toml, written as Nix.

macOS permissions

On its first run, stochos asks for Accessibility permission. It needs it to read your keys while the grid is up and to click. Open System Settings → Privacy & Security → Accessibility, switch on stochos, or the terminal you started it from, and run it again.

If stochos then stops with CGEventTapCreate failed, switch it on under Privacy & Security → Input Monitoring as well.

Hint mode also takes a screenshot, for which macOS asks for Screen Recording permission.

Checking it works

shell
stochos

The grid covers the screen. Press Escape to close it. Next, bind it to a key.