skip to content
MusesΜοῦσαιdocs

running / 10 of 13

Wayland, X11 and macOS

stochos has a backend for each. They draw the same grid and read the same keys, but each covers the screen and clicks in its own way.

Which one runs

With WAYLAND_DISPLAY set, stochos starts on Wayland. If that fails and DISPLAY is set as well, as it is under XWayland, it starts on X11 instead. On macOS there’s only the one.

Keys follow your keyboard layout on all three: a is whichever key types an a.

Wayland

  • Protocols. The grid is a wlr-layer-shell surface on the overlay layer, over your windows and bars, and it takes the keyboard while it’s up. Clicks go through wlr-virtual-pointer, and hint mode’s screenshots through wlr-screencopy. Hyprland and Sway have all three, and stochos is developed on Hyprland.
  • One display. The grid covers the display the compositor opens it on, usually the focused one, and the pointer stays on it. To click on another display, focus it first.
  • Key repeat. A held key repeats after 300 ms, 25 times a second. stochos repeats it itself and ignores your compositor’s repeat settings.

X11

  • XTest. stochos clicks through the XTest extension, and is developed on i3. GNOME on X11 works too.
  • Every display. The grid is one window over the whole X screen, and the X screen spans every monitor.
  • A still frame. X11 can’t blend a window with what’s under it, so stochos takes a screenshot as it opens and draws the grid on that. Anything moving behind the grid stops until it closes.
  • Key repeat follows xset r rate.

macOS

  • Permissions. stochos needs Accessibility permission, and hint mode’s screenshot needs Screen Recording. See macOS permissions.
  • The main display. The grid covers the display with the menu bar.
  • Key repeat follows System Settings → Keyboard.
  • Apple Silicon. Release binaries are for Apple Silicon. On an Intel Mac, install with Cargo.