Getting started
Early development
touchcue works on Linux only. Release archives for Windows and macOS exist but detect nothing yet; see Platforms.
What it does
When a hardware authenticator waits for a physical touch, touchcue shows a popup that takes no input focus, or a desktop notification. The prompt names the program that asked for the touch, such as the browser or the tool that ran git, and the device. It detects:
- FIDO2/U2F keys of any vendor, read from their hidraw devices;
- OpenPGP cards used through gpg-agent, by
gpgand by ssh through gpg-agent's ssh support. This needstouchcue gpg install.
Install
From a release archive
Each release has a touchcue-<target>.tar.gz archive per platform and a SHA256SUMS file. For x86_64 Linux with glibc:
curl -LO https://github.com/theaifam5/touchcue/releases/latest/download/touchcue-x86_64-unknown-linux-gnu.tar.gz
curl -LO https://github.com/theaifam5/touchcue/releases/latest/download/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
tar -xzf touchcue-x86_64-unknown-linux-gnu.tar.gz
cd touchcue-x86_64-unknown-linux-gnuLinux archives exist for x86_64 and aarch64, each for gnu and musl. An archive holds touchcue, touchcue-helper, completions/, man/touchcue.1, the licences and the README. Install the binary, the man page and the completions for your shell:
install -D touchcue ~/.local/bin/touchcue
install -Dm644 man/touchcue.1 ~/.local/share/man/man1/touchcue.1
install -Dm644 completions/touchcue.bash ~/.local/share/bash-completion/completions/touchcue
install -Dm644 completions/touchcue.fish ~/.config/fish/completions/touchcue.fishcompletions/ also holds touchcue.zsh, touchcue.nu and touchcue.ps1. The completions need the usage CLI on PATH, and bash also needs bash-completion loaded first. touchcue-helper does nothing yet and need not be installed.
With mise
mise use -g packslip:github.com/theaifam5/touchcueA minimum_release_age setting in your mise configuration can hide a release younger than that age.
From source
Install the Rust toolchain pinned in rust-toolchain.toml, then run from the repository:
cargo install --locked --path crates/touchcueThis installs touchcue into ~/.cargo/bin. Contributors can use mise run build instead, which builds every workspace crate into target/. The repository's completions/ and man/ directories hold the same files as the archives.
Check the setup
touchcue checkIt prints whether the configuration is valid, whether a Wayland compositor, Wayland layer-shell and a notification service are available, every FIDO device and whether touchcue can read it, the output backend touchcue run would choose, the IPC endpoints, the gpg setup, the number of hooks with how many of them have until, the requester skip list, and the icon theme with where it came from. The requester lines show how touchcue reads the terminal it runs in, with skipped processes in brackets:
requester: skip = ["sh", "bash", …, "systemd", "init"] (defaults)
requester: here: touchcue ← [nu] ← [herdr] ← [herdr] ← [nu] ← kitty → "touchcue in kitty"
icons: theme = "Papirus-Dark" (portal org.gnome.desktop.interface)It exits with status 1 when the configuration is invalid or a FIDO device cannot be read.
touchcue list-devices lists the connected FIDO devices. touchcue trace prints the detection signals until interrupted, which helps when a touch is not detected.
Run the daemon
In the foreground:
touchcue run -v-v logs at info level and -vv at debug level; the TOUCHCUE_LOG environment variable takes a tracing filter and overrides both. Logs and touchcue check use colors only on a terminal; setting NO_COLOR to any non-empty value turns them off.
As a systemd user service
Each release also has the systemd unit, touchcue.service:
mkdir -p ~/.config/systemd/user
curl -Lo ~/.config/systemd/user/touchcue.service \
https://github.com/theaifam5/touchcue/releases/latest/download/touchcue.serviceThe unit runs touchcue run, which systemd finds only in /usr/local/bin and /usr/bin. For any other install path, override the command with systemctl --user edit touchcue.service, for example for ~/.local/bin:
[Service]
ExecStart=
ExecStart=%h/.local/bin/touchcue runUse %h/.cargo/bin/touchcue after cargo install. For mise, mise which touchcue prints the path, which changes with every upgrade. Then start it:
systemctl --user daemon-reload
systemctl --user enable --now touchcue.serviceThe unit starts with graphical-session.target, so it needs a session manager that activates that target.
gpg and ssh through gpg-agent
touchcue gpg installThis makes gpg-agent start touchcue as its scdaemon-program. See gpg and ssh. For ed25519-sk and ecdsa-sk keys, the FIDO source shows the prompt already; ssh askpass adds the key and remote user to it.
Migrating from yubikey-touch-detector
Stop and disable its socket and service:
systemctl --user disable --now yubikey-touch-detector.socket yubikey-touch-detector.service. A socket unit left active keeps the socket path, and touchcue skips its compatible socket.Start touchcue as above.
If a status bar or script reads
$XDG_RUNTIME_DIR/yubikey-touch-detector.socket, turn on the compatible socket:toml[compat.maxbaz_socket] enabled = true
touchcue serves that socket at the same path with the same 5-byte messages, U2F_1/U2F_0, GPG_1/GPG_0 and MAC_1/MAC_0. It skips the socket with a warning while yubikey-touch-detector still serves it. See IPC.