Configuration
touchcue reads $XDG_CONFIG_HOME/touchcue/config.toml, else ~/.config/touchcue/config.toml. --config <PATH> names another file, which must then exist. A missing default file means the defaults below.
Every key is optional. Unknown keys and out-of-range values are errors: touchcue run refuses to start and touchcue check reports them, both with the location in the file where it is known.
Example
The defaults, written out:
# locale is read from the environment when unset
[output]
mode = "popup"
fallback = "notification"
[popup]
position = "center"
output = "focused"
min_display_ms = 800
show_delay_ms = 0
modal = false
modal_dim = 0.4
modal_dismiss = true
animations = true
[notification]
urgency = "critical"
safety_timeout_s = 60
[icons]
# theme is detected when unset
[templates]
title = 'Touch {{ device.vendor or "your security key" }}'
body = '{{ requester.label or process.name or "An application" }} is waiting for {{ request.action }}'
[sources.fido]
enabled = true
keepalive_timeout_ms = 1500
retry_window_ms = 1000
[sources.gpg]
enabled = true
[ipc]
enabled = true
[dbus]
enabled = true
[compat.maxbaz_socket]
enabled = false
[requester]
skip = [
"sh", "bash", "dash", "zsh", "fish", "nu", "ksh", "mksh", "tcsh", "csh", "elvish", "xonsh",
"tmux*", "screen", "zellij", "herdr", "abduco", "dtach",
"timeout", "nice", "nohup", "setsid", "stdbuf", "time", "xargs", "flock", "ionice", "chrt",
"taskset", "env", "sudo", "doas", "su", "run0",
"systemd", "init",
]
extend_skip = []locale
| Key | Values | Default |
|---|---|---|
locale | a locale name such as pl, de or pl_PL.UTF-8 | from the environment |
locale chooses the language of the built-in prompt text: the default title and body, request.action, and the (cancelled) and (timed out) suffix. English, Polish (pl) and German (de) are available. Without locale, or with an empty one, touchcue run reads the first non-empty of LC_ALL, LC_MESSAGES and LANG once at start. The language is the part of the name before the first _, . or @; C, POSIX and other languages mean English; the first non-empty value decides, so an unknown locale does not fall back to the environment. Templates you write are not translated. As a top-level key, locale goes before the first [section] of the file:
locale = "pl"
[output]
mode = "popup"[output]
| Key | Values | Default |
|---|---|---|
mode | popup, notification, both, none, command | popup |
fallback | the same | notification |
mode is used when the desktop supports it, else fallback, else nothing is shown.
popupshows an overlay popup that takes no input focus. It uses Wayland layer-shell whenWAYLAND_DISPLAYorWAYLAND_SOCKETis set and the compositor supports it, else X11 whenDISPLAYis set, which includes XWayland. When the display connection is lost, for example because the compositor restarted, touchcue reconnects as it started, throughWAYLAND_DISPLAY, elseDISPLAY, first after 1 second and then less often, up to once a minute, and shows the prompts still visible again. It does not follow a compositor that comes back under another socket name, and may then reconnect throughDISPLAYto XWayland.notificationsends a desktop notification over D-Bus; the notification server draws it, here mako:
bothshows the popup and a notification.noneshows nothing.commandis accepted, but skipped with a warning. To show prompts through programs such as rofi or fuzzel, use hooks withuntil; see Launchers.
[popup]
| Key | Values | Default |
|---|---|---|
position | center, top-left, top-right, bottom-left, bottom-right, top, bottom | center |
output | "focused", "all", "cursor", or a list of output names | "focused" |
min_display_ms | 0 to 600000 | 800 |
show_delay_ms | 0 to 600000 | 0 |
modal | true, false | false |
modal_dim | 0.0 to 1.0 | 0.4 |
modal_dismiss | true, false | true |
animations | true, false | true |

Popups are drawn at the scale of the output they are on: at fractional scales such as 1.5 when the Wayland compositor supports fractional-scale-v1, else at the integer scale it prefers. On X11 the scale comes from Xft.dpi.
min_display_ms is the shortest time a shown popup stays visible. show_delay_ms is how long a request must wait before its popup appears.

Several popups on one output stack in the order the requests started: away from the screen edge, or vertically around the centre with center.

State overlay
The application icon is drawn dimmed, with the request's state centred over it. A popup without an icon shows the state alone in the icon's place.
While the request waits for a touch, a spinner turns over the icon.
When the operation ends, the spinner gives way to a mark on a coloured disc: a check on green after a touch, a cross on red after a cancel or failure, and a clock on amber after a timeout.



When a client retries, the mark gives way to the spinner again.

Each change fades and grows into place over 250 ms. With animations = false, or when the desktop asks for reduced motion, the spinner stands still and each mark appears at once. touchcue reads the desktop preference once at start, through the XDG desktop portal: reduced-motion = 1 in org.freedesktop.appearance, or enable-animations = false in org.gnome.desktop.interface where the portal provides it. Without a portal, motion is not reduced.
Outputs
output chooses the monitors that show the popup. The popup's output is chosen when it appears.
"focused"lets the Wayland compositor pick, usually the focused monitor. On X11 it is the monitor under the mouse pointer."all"shows a popup on every output.
"cursor"uses the output under the mouse pointer. On Wayland this works only on Hyprland, through its IPC socket. Elsewhere, or when the query fails, touchcue logs a warning and falls back to"focused". On X11 it is the same as"focused".A list such as
["DP-1", "HDMI-A-1"]shows a popup on each listed output that exists. Wayland names come from the compositor (hyprctl monitors,swaymsg -t get_outputs), X11 names from RandR (xrandr --listmonitors). When none of them exists, touchcue logs a warning and falls back to"focused". An empty list or an empty name is an error.
Modal popups
With modal = true, a popup that waits for a touch also blocks clicks: on each of its outputs, a full-screen layer behind the popup takes every click. The keyboard is never grabbed. Keyboard input remains with the focused window. The overlay is removed when no request on that output waits any more, and after 120 seconds at most, even when requests still wait; requests that start while it is shown do not extend it. After those 120 seconds, that output gets no new overlay for 30 seconds.

modal_dimis how dark the overlay is, up to1.0(black).0.0blocks clicks without dimming:
With
modal_dismiss = true, a click or touch on the overlay hides the popups and overlays of the requests on it. Only the display is hidden: the request keeps waiting for a touch. The next request on that output gets a new overlay right away. Only the left, middle and right buttons dismiss; scrolling and side buttons do not.With
modal_dismiss = false, requests that follow each other can keep an output dimmed for longer than 120 seconds: the limit applies to each overlay, and a new request gets a new overlay once the previous one ended, or 30 seconds after it reached the limit. The keyboard keeps working throughout.
On X11 the overlay blocks clicks without dimming; modal_dim has no effect. On Wayland the overlay is on the layer-shell overlay layer, above windows and panels.
[notification]
| Key | Values | Default |
|---|---|---|
urgency | low, normal, critical | critical |
safety_timeout_s | 0 to 600 | 60 |
safety_timeout_s is the time after which the notification server withdraws a notification even if the request still waits; touchcue passes it as the notification's expiry, where 0 means never.
[icons]
| Key | Values | Default |
|---|---|---|
theme | the directory name of an icon theme, such as Papirus-Dark | detected |
Application icons from desktop entries and the icon names of [[rules]] are looked up in this theme, then in the themes it inherits from, then in hicolor, as the freedesktop Icon Theme Specification describes, at 64 pixels. Themes are found in ~/.icons, in icons below $XDG_DATA_HOME (~/.local/share when unset) and below each directory of $XDG_DATA_DIRS (/usr/local/share:/usr/share when unset), and in /usr/share/pixmaps, in that order; the first index.theme found for a theme describes it. An icon that no theme holds is then looked for as a file named after it directly in those directories. Only PNG and SVG files are used, and a .png, .svg or .xpm ending of an icon name, as in Icon=app.png of some desktop entries, is ignored. The result of each name lookup is kept: a name found in no theme is not looked up again until the daemon restarts or more than 512 names have been looked up, and a file found is checked to still exist each time it is used. A value that is empty, . or .., or contains / or control characters is a configuration error.
Without theme, touchcue run detects the theme once at start, from the first of these that names an installed theme:
- the XDG desktop portal settings
icon-themeoforg.gnome.desktop.interface, thenThemeoforg.kde.kdeglobals.Icons; gtk-icon-theme-namein the[Settings]group of~/.config/gtk-4.0/settings.ini, then of~/.config/gtk-3.0/settings.ini;Themein the[Icons]group of~/.config/kdeglobals;icon_themein the[Appearance]group of~/.config/qt6ct/qt6ct.conf, then of~/.config/qt5ct/qt5ct.conf;hicolor.
~/.config stands for $XDG_CONFIG_HOME when it is set. On a desktop whose XDG_CURRENT_DESKTOP lists KDE, the KDE portal setting is read before the GNOME one. The portal is skipped when no portal is installed or running on the session bus, and when connecting, starting it and reading both settings take more than 1.5 s. Detection, reading the chosen theme included, takes at most 3 s; after that the daemon starts with hicolor and logs a warning. A configured or detected theme that is not installed is skipped with a warning, and the next source is tried: a configured theme is followed by the detection above. A theme changed on the desktop is used after the daemon restarts. touchcue check prints the theme and where it came from, for example icons: theme = "Papirus-Dark" (portal org.gnome.desktop.interface).
[templates]
| Key | Default |
|---|---|
title | Touch {{ device.vendor or "your security key" }} |
body | {{ requester.label or process.name or "An application" }} is waiting for {{ request.action }} |
These are the English defaults. With Polish or German as the locale, the defaults are:
| Language | title | body |
|---|---|---|
| Polish | Dotknij klucza {{ device.vendor or "bezpieczeństwa" }} | {{ requester.label or process.name or "Aplikacja" }} czeka na {{ request.action }} |
| German | Bitte {{ device.vendor ~ "-Schlüssel" if device.vendor else "Sicherheitsschlüssel" }} berühren | {{ requester.label or process.name or "Eine Anwendung" }} wartet auf {{ request.action }} |
The default body names the requester and its application through requester.label: claude in Kitty is waiting for a GPG signature, or Firefox is waiting for a passkey when the application asks itself. request.action words what the request waits for.
Templates use Jinja syntax with placeholders. A template that fails while rendering is replaced by the next of: the matching rule's template, the [templates] template, the default above, and an empty text. A request that ended without a touch keeps its prompt briefly: the popup shows the outcome in its state overlay, and a notification appends (cancelled) or (timed out) to the body, in Polish (anulowano) or (upłynął limit czasu), in German (abgebrochen) or (Zeitüberschreitung).
The title wraps to at most two lines and the body to at most six; longer text ends with an ellipsis:


[[rules]]
Rules change the prompt for matching requests. The first rule whose match entries all equal the request's placeholder values applies; later rules are ignored.
[[rules]]
match = { "process.name" = "ssh", "request.method" = "fido2" }
title = "Touch your key for ssh"
body = '{{ requester.label or "ssh" }} is signing in{% if request.detail %}: {{ request.detail }}{% endif %}'
icon = "utilities-terminal"
[[rules]]
match = { "requester.name" = "claude" }
icon = "~/.local/share/icons/claude.svg"
[[rules]]
match = { "app.id" = "org.mozilla.firefox" }
suppress = true| Key | Type | Meaning |
|---|---|---|
match | table of strings | Placeholder names and values. Required and non-empty. Values compare exactly and case-sensitively; a placeholder without a value never matches. |
title | template | Replaces templates.title. |
body | template | Replaces templates.body. |
icon | path or name | Icon shown instead of the application's icon: an absolute path, a path starting with ~/ in your home directory, or an icon name. |
suppress | boolean | Shows nothing for matching requests. IPC still publishes them. Default false. |
An icon path must name a PNG or SVG file. A ~/ path must stay in your home directory: an absolute rest, as in ~//etc, or a .. part is a configuration error. A value without /, such as utilities-terminal, is an icon name, looked up in the icon theme like application icons. Other relative paths are a configuration error. Icon paths are looked up whenever a prompt is shown or changes, within 0.5 s. Files created after startup are eligible. An icon name that was not found stays unfound until the daemon restarts or more than 512 names have been looked up, as described under [icons]. When no file is found in time, the prompt shows the application's icon and the daemon logs a warning.
![]()
The icon shown is not proof of which program asked for a touch: any program running as your user can put lookalike icons in ~/.icons or ~/.local/share/icons, or install desktop entries that name another application's icon.
[[hooks]]
Hooks run a command on touchcue events. See Hooks for the events, the environment the command gets, and recipes. With hooks, this file runs commands as your user: keep it writable only by you, and never run the daemon as root with a configuration file another user can write.
[[hooks]]
on = ["started"]
match = { "request.method" = "fido2" }
command = ["pw-play", "/usr/share/sounds/freedesktop/stereo/message.oga"]
timeout_ms = 5000
concurrency = 4| Key | Type | Meaning |
|---|---|---|
on | list of event names | Events that run the command. Required and non-empty. An unknown name is an error. |
match | table of strings | Placeholder names and values that must all be equal, as in [[rules]]. Optional; without it, every listed event runs the command. Device events only have device.* values and daemon events none. A match requiring values absent from the event does not run. match only selects events: application and process names are set by the processes themselves. |
command | list of strings | The program and its arguments, run without a shell. Required, and the program must not be empty. |
timeout_ms | 1 to 600000 | Time the command may run before it is ended. Default 5000. Not allowed with until. |
concurrency | 1 to 32 | Most runs of this hook at once. Default 4. Not allowed with until. |
until | ended | Runs one process per request until the request ends, instead of one run per event; on may then list only started and waiting. See Hooks that last for a request. |
on_change | restart, stream, ignore | With until: what a change of the request does to its process. Default restart. |
stop_signal | SIGTERM, SIGINT, SIGHUP | With until: signal that stops the process. Default SIGTERM. |
stop_grace_ms | 0 to 2000 | With until: time between stop_signal and SIGKILL. Default 1000. |
restart_interval_ms | 0 to 600000 | With until: shortest time between two starts of the process of one request. Default 200. |
[sources.fido]
| Key | Values | Default |
|---|---|---|
enabled | boolean | true |
keepalive_timeout_ms | 100 to 600000 | 1500 |
retry_window_ms | 1 to 600000 | 1000 |
keepalive_timeout_ms is how long a FIDO request survives without a keepalive from the key. retry_window_ms is how long an ended operation waits for a client retry. A client retry during that interval continues the same prompt.
[sources.gpg]
| Key | Values | Default |
|---|---|---|
enabled | boolean | true |
Turns on the helper socket $XDG_RUNTIME_DIR/touchcue/helper.sock, through which the gpg-agent wrapper and touchcue askpass report operations.
[requester]
| Key | Values | Default |
|---|---|---|
skip | list of process names | shells, multiplexers, wrappers and service managers, as in the example above |
extend_skip | list of process names | [] |
These lists name the processes passed over when looking for the requester. skip replaces the built-in list, and skip = [] passes over nothing; extend_skip adds names to skip or to the built-in list. To also pass over the editor whose terminal you work in:
[requester]
extend_skip = ["nvim"]An entry is a name, compared exactly and case-sensitively with the process's comm, or with its executable's file name when comm cannot be read, or a prefix ending in *, such as tmux*. The kernel truncates comm to 15 bytes. Use a prefix entry for longer names. An invalid entry is reported with its location in the file. touchcue check prints the effective list; copy the list after skip = into the configuration to start from it.
IPC
| Section | Key | Default |
|---|---|---|
[ipc] | enabled | true |
[dbus] | enabled | true |
[compat.maxbaz_socket] | enabled | false |
All endpoints need XDG_RUNTIME_DIR. They only send; clients cannot change anything.
- Event socket,
$XDG_RUNTIME_DIR/touchcue/events.sock, from[ipc]. Each line is one JSON object withkind(started,updatedorended),id,state,reason(set only forended:touched,cancelled,failedortimed_out),sourceandvalues. A new client first gets astartedline for every active request. Only processes of the same user may connect. - D-Bus, from
[dbus]: the session bus nameio.github.theaifam5.Touchcue, object/io/github/theaifam5/Touchcue, interfaceio.github.theaifam5.Touchcue1. It has the propertyActive, the methodActiveRequests, and the signalsRequestStarted,RequestUpdatedandRequestEnded. - Compatible socket,
$XDG_RUNTIME_DIR/yubikey-touch-detector.socket, from[compat.maxbaz_socket]. It sends the 5-byte messages of yubikey-touch-detector:U2F_1/U2F_0for FIDO,GPG_1/GPG_0for gpg and ssh, andMAC_1/MAC_0. Only requests that still wait for a touch count.
values holds only these placeholders: every request.* key, device.vendor, device.model, device.product, device.kind, device.transport, device.vid, device.pid, app.name, app.id, app.icon, app.container, process.name, process.chain, requester.name and requester.label. Executable paths, pids, uids and command lines are never published. process.chain and requester.* do expose the names of the client's parent processes, such as the shell and tools that ran it, to every client of the socket and the bus name.
A second touchcue run exits while the event socket or the bus name is in use.