Skip to content

Installing Virgul

Every platform has two ways in: the prebuilt binaries of a GitHub release, or a build from source on your machine (from a release’s source, or the main branch).

Platform Prebuilt From source
Arch Linux AUR virgul-bin AUR virgul, virgul-git
Debian, Ubuntu .deb make
Fedora, openSUSE .rpm make
Any Linux install.sh, tarball install.sh --source
Nix, NixOS virgul-bin flake: virgul, virgul-ui
Windows setup, winget, Scoop, zip make build-windows (from Linux), or Go + Node
macOS Homebrew cask, zip, install.sh Homebrew formula, make build-macos

Two programs come with it: virgul (the command line and the daemon) and virgul-ui (the desktop app, which starts the daemon). On Linux the app needs WebKitGTK 4.1.


Virgul is my-gesture’s new name. Install it like any version; the first virgul command (or the app) does the rest:

  • Files: ~/.config/my-gesture becomes ~/.config/virgul (and my-gesture.db becomes virgul.db); the data, cache and log directories move the same way (%APPDATA%, %LOCALAPPDATA% and ~/Library on Windows and macOS). Nothing moves when a Virgul directory already exists. The state servers of your own integrations are pointed at virgul state-server.
  • Autostart: my-gesture’s systemd user service, Run value or LaunchAgent is stopped and removed, and Virgul’s is enabled instead.
  • Packages: the AUR, deb and rpm packages replace my-gesture’s and install my-gesture as a link to virgul, so bindings that run my-gesture … keep working; install.sh does the same. The Windows setup uninstalls my-gesture first. On Homebrew, the tap renames the formula and cask. On NixOS, programs.my-gesture still works (renamed to programs.virgul).
  • Files you exported: .mgprofile files still import (new exports are .vgprofile), and a sync folder’s .mgsync.json copies are read until each machine pushes again.
  • To check by hand: the uinput keyboard is now named virgul-kbd and the overlay’s layer namespace virgul-overlay: rename them in your compositor’s config if it mentions them. On macOS, grant Input Monitoring and Accessibility again to virgul.app (a new app for macOS).

Each release (vX.Y.Z) has, for version X.Y.Z:

Asset Contents
virgul_X.Y.Z_linux_amd64.tar.gz virgul, virgul-ui, LICENSE, README.md, INSTALL.md, contrib/ (udev rules, systemd user unit, desktop entry, icons)
virgul_X.Y.Z_linux_arm64.tar.gz the same without the app (virgul only, no desktop entry)
virgul_X.Y.Z_linux_amd64.deb, .rpm everything above, installed under /usr
virgul_X.Y.Z_windows_amd64_setup.exe per-user installer (no admin rights), Qt runtime for the trail included
virgul_X.Y.Z_windows_amd64.zip the same files, without installer
virgul_X.Y.Z_macos_universal.zip virgul.app (Apple silicon and Intel, macOS 11+), the CLI inside
checksums.txt sha256 of every asset (sha256sum -c checksums.txt --ignore-missing)

The Linux binaries are built on Ubuntu 22.04: they run on any distribution with glibc 2.35 or newer. virgul itself is static.


Whatever the method, the daemon runs as you and needs the mice, keyboards and /dev/uinput of your session. The udev rules (70-virgul.rules) give them to the user of the active local session (logind uaccess), so nobody needs the input group. Packages (AUR, .deb, .rpm, NixOS module) install and apply them; otherwise, once:

Terminal window
sudo install -Dm644 contrib/70-virgul.rules /etc/udev/rules.d/70-virgul.rules # or: make install-udev
sudo udevadm control --reload && sudo udevadm trigger --subsystem-match=misc --subsystem-match=input

Then, as your user:

Terminal window
virgul doctor # checks devices, uinput, window manager, overlay…
systemctl --user enable --now virgul # start the daemon with the session (packages ship the unit)
virgul autostart enable # same, writing the unit for this binary (tarball, install.sh)

Opening the app also starts the daemon. Optional, for the gesture trail on Wayland: Quickshell (qs) or Qt 6’s qml tool with the QtWebSockets module. Also useful: xkbcomp (key combos that follow the keyboard layout, read from XWayland), notify-send, and Python 3 for camera tracking (it makes its own virtualenv).


Terminal window
yay -S virgul-bin # prebuilt (x86_64: CLI and app; aarch64: CLI only)
yay -S virgul # built from the release's source (go, nodejs, npm)
yay -S virgul-git # built from the main branch

Without an AUR helper: git clone https://aur.archlinux.org/virgul.git && cd virgul && makepkg -si. The PKGBUILDs are in contrib/aur/: makepkg -si in one of those folders works the same. pacman applies the udev rules; then systemctl --user enable --now virgul.


Prebuilt (Debian 12+, Ubuntu 22.04+):

Terminal window
curl -LO https://github.com/Apo-Z/virgul/releases/download/vX.Y.Z/virgul_X.Y.Z_linux_amd64.deb
sudo apt install ./virgul_X.Y.Z_linux_amd64.deb
systemctl --user enable --now virgul

It depends on libgtk-3-0 and libwebkit2gtk-4.1-0, recommends x11-xkb-utils and libnotify-bin, and suggests Qt 6’s QML runtime for the trail (qml-qt6, qml6-module-qtwebsockets…).

From source: Go 1.21 or newer (it fetches the version go.mod asks for) and Node.js 18 or newer; Ubuntu 22.04’s are too old, take them from go.dev and nodejs.org:

Terminal window
sudo apt install golang nodejs npm make gcc pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev
git clone https://github.com/Apo-Z/virgul && cd virgul
git checkout vX.Y.Z # a release, or stay on main
make install-all # builds and installs both programs in ~/.local
make install-udev # the udev rules (sudo)

Or build the same .deb as the release and install it: make deb && sudo apt install ./build/dist/virgul_*.deb (nfpm is run with go run).


Fedora, openSUSE and other RPM distributions

Section titled “Fedora, openSUSE and other RPM distributions”

Prebuilt: sudo dnf install ./virgul_X.Y.Z_linux_amd64.rpm (depends on gtk3 and webkit2gtk4.1).

From source: sudo dnf install golang nodejs npm make gcc pkgconf-pkg-config gtk3-devel webkit2gtk4.1-devel, then as for Debian (make install-all, make install-udev), or make rpm.


install.sh installs into ~/.local without root, checks the download against checksums.txt, and prints the udev command to run:

Terminal window
curl -fsSL https://raw.githubusercontent.com/Apo-Z/virgul/main/install.sh | sh # prebuilt
curl -fsSL https://raw.githubusercontent.com/Apo-Z/virgul/main/install.sh | sh -s -- --source # build it

Options: --version X.Y.Z, --prefix DIR, --no-ui (CLI and daemon only), --from DIR (build a local checkout). --source checks for Go, Node.js, npm, a C compiler and the GTK/WebKitGTK development files, and says what is missing.

By hand: unpack virgul_X.Y.Z_linux_amd64.tar.gz, copy virgul and virgul-ui to a directory on your PATH, then the udev rules as above and virgul autostart enable.

For a system-wide install from a checkout: make build-all && sudo make install-system PREFIX=/usr/local (binaries, udev rules, systemd user unit, desktop entry, icons; make uninstall-system PREFIX=/usr/local removes them).


The repository is a flake (flake.nix, nix/), for x86_64-linux and aarch64-linux:

Package
virgul-ui (default) CLI, daemon and app, built from source
virgul CLI and daemon only, built from source
virgul-bin the release’s prebuilt binaries
Terminal window
nix run github:Apo-Z/virgul # the app
nix run github:Apo-Z/virgul#virgul -- doctor # the CLI
nix profile install github:Apo-Z/virgul # the app and the CLI
nix profile install github:Apo-Z/virgul#virgul-bin

On NixOS, the module installs the package, the udev rules and a systemd user service started with the graphical session:

{
inputs.virgul.url = "github:Apo-Z/virgul";
outputs = { nixpkgs, virgul, ... }: {
nixosConfigurations.host = nixpkgs.lib.nixosSystem {
modules = [
virgul.nixosModules.default
{
programs.virgul.enable = true;
# programs.virgul.package = virgul.packages.x86_64-linux.virgul-bin;
# programs.virgul.service.enable = false; # no user service
}
];
};
};
}

With the module, don’t run virgul autostart enable: it would write a unit pointing at a store path that a later update removes. overlays.default adds the three packages to nixpkgs, and nix develop opens a shell with Go, Node.js and the GTK/WebKitGTK libraries. Outside NixOS, install the udev rules by hand (above): the package has them in lib/udev/rules.d/.


Prebuilt, one of:

  • the installer, virgul_X.Y.Z_windows_amd64_setup.exe: no admin rights, installs in %LOCALAPPDATA%\Programs\virgul, adds it to your PATH, can start the daemon at logon, Start menu entries and uninstaller;
  • winget: winget install Apo-Z.Virgul (the same installer);
  • Scoop: scoop bucket add apo-z https://github.com/Apo-Z/scoop-bucket then scoop install apo-z/virgul (the zip);
  • the zip: unpack it anywhere and run virgul-ui.exe.

The app needs the WebView2 runtime (part of Windows 10 and 11). Then virgul doctor, and virgul autostart enable to start the daemon at logon.

From source, cross-compiled on Linux (Go, Node.js; NSIS or Docker for the installer):

Terminal window
make build-windows # build/windows/virgul.exe and virgul-ui.exe
make windows-installer # + the Qt runtime and build/windows/virgul-setup.exe

On Windows itself, with Go, Node.js and Git (the app doesn’t need cgo, nor the Wails CLI):

Terminal window
git clone https://github.com/Apo-Z/virgul; cd virgul
go build -o virgul.exe .
cd ui\frontend; npm ci; npm run build; cd ..\..
go build -tags desktop,production -ldflags "-H windowsgui" -o virgul-ui.exe ./ui

These have no icon nor manifest (make build-windows adds them with go-winres), and no Qt: the trail needs Qt 6’s qml.exe with the QtWebSockets module on PATH.


Prebuilt:

Terminal window
brew install --cask apo-z/tap/virgul # virgul.app, and the virgul command

Or unpack virgul_X.Y.Z_macos_universal.zip into /Applications yourself, or curl -fsSL https://raw.githubusercontent.com/Apo-Z/virgul/main/install.sh | sh (puts the app in ~/Applications and links the command into ~/.local/bin).

The app is signed ad hoc, not notarised: if macOS refuses to open it, allow it in System Settings → Privacy & Security → Open Anyway (right click → Open before macOS 15), or xattr -dr com.apple.quarantine /Applications/virgul.app. Its guide asks for Input Monitoring and Accessibility (and optionally Screen Recording, for window titles); an ad hoc signature changes with each version, so macOS may ask again after an update. The trail needs Qt 6: brew install qt.

From source:

Terminal window
brew install apo-z/tap/virgul # the command line and daemon, built with Go
brew install --HEAD apo-z/tap/virgul # from the main branch

The app itself is built on a Mac with Go, Node.js and the Xcode command line tools: make build-macos (universal build/macos/virgul.app), or install.sh --source, which runs it and installs the app.


Makefile targets (version from git describe, or VERSION=vX.Y.Z):

Target
make dist build/dist/virgul_<version>_linux_<arch>.tar.gz with the app (this machine’s arch)
make dist-cli DIST_ARCH=arm64 the CLI-only tarball, cross-compiled
make deb, make rpm, make packages the .deb/.rpm (contrib/nfpm.yaml)
make install-system DESTDIR=… PREFIX=/usr binaries, udev rules, systemd user unit, desktop entry, icons and licence, after make build-all (NO_UI=1 without the app)

make install, install-cli, install-ui and install-all keep installing into ~/.local for your user.

After a release, contrib/packaging/update.sh X.Y.Z writes its version and checksums into every manifest (AUR PKGBUILDs and .SRCINFO, Homebrew formula and cask, Scoop, winget, nix/release.nix); --dry-run shows the diff, --dir DIR reads checksums.txt and the source tarball from a folder. When go.sum or ui/frontend/package-lock.json change, --nix-deps recomputes the Nix dependency hashes (nix/deps.nix). Then publish them:

Where What
AUR contrib/aur/<package>/{PKGBUILD,.SRCINFO,virgul.install} into ssh://aur@aur.archlinux.org/<package>.git
Homebrew contrib/homebrew/{Formula,Casks} into the Apo-Z/homebrew-tap repository
Scoop contrib/scoop/virgul.json into bucket/ of Apo-Z/scoop-bucket (its checkver/autoupdate also let Scoop’s tools update it)
winget contrib/winget/*.yaml into manifests/a/Apo-Z/virgul/X.Y.Z/ of a microsoft/winget-pkgs fork, then a pull request
Nix the flake reads nix/: commit it