Introduction
quick-key is a keyboard menu for Quickshell whose rows show live state beside labels that never change, and where the key path you press (a 2) is the binding you script. One key opens it. A pop-up shows changes to the volume, the microphone, brightness, the keyboard layout and keep-awake.
It is a menu first. It sits beside the bar or shell you have and replaces neither. Plugins add the rest, most of them a command and a few lines of config (see Recipes).
It runs without a config; config.json changes only what you set (see Configuration).
Getting started
Needs Quickshell 0.3 or later, PipeWire, and a Nerd Font for the icons: theme.monospaceFont names it, and without one the icons show as boxes. niri adds the keyboard layout and output details; elsewhere the rest works (see Compositor).
Install with Nix
Add the flake, pinned to a release, whose notes list what changed in the options:
{
inputs.quick-key.url = "github:bphenriques/quick-key/<release tag>";
inputs.quick-key.inputs.nixpkgs.follows = "nixpkgs";
inputs.quick-key.inputs.home-manager.follows = "home-manager";
}
Leave the tag off to follow main. Import the module in home-manager and enable it:
{ inputs, ... }:
{
imports = [ inputs.quick-key.homeModules.default ];
programs.quick-key = {
enable = true;
settings.theme.name = "catppuccin-mocha";
};
}
The module runs it as its own user service, quick-key, bound to the Wayland session target and restarted when the configuration changes. A Quickshell config of your own (a bar) runs beside it.
Commands run on the service’s PATH: extraPackages first, then the standard tools the defaults use, then the session’s. Put in extraPackages what your commands and plugins call by name (config.services.dunst.package for the dunst plugin).
Install without Nix
Clone the repository, link the shell into Quickshell’s configs and start it with the session:
git clone https://github.com/bphenriques/quick-key ~/.local/share/quick-key
ln -s ~/.local/share/quick-key/packages/quick-key ~/.config/quickshell/quick-key
// niri
spawn-at-startup "qs" "-c" "quick-key"
Bind a key
One key opens the menu:
// niri
binds {
Mod+Space { spawn "qs" "-c" "quick-key" "ipc" "call" "menu" "toggle"; }
}
With Nix, the same through exec.ipc, a command line that needs a shell: Mod+Space { spawn-sh "${config.programs.quick-key.exec.ipc} menu toggle"; }.
Any key path binds the same way, so a binding never drifts from what the menu shows: Mod+F2 { spawn "qs" "-c" "quick-key" "ipc" "call" "menu" "press" "a 2"; } picks the second audio output as typing a 2 would (Keys).
First run
It runs without a config. The starter menu holds audio, network, Bluetooth and music, with the calendar on the clock and the tray and the session in its bar. Press its key: each row’s letter runs it, ESC goes back, and ? lists the keys no row shows (see Menu).
Check and logs
qs -p <the shell's folder>/check.qml checks config.json, printing what is wrong and exiting 1 (see Configuration). With Nix it runs as the configuration builds, so a mistake fails the build, not the session.
The shell logs the same as it starts, and every warning after: journalctl --user -u quick-key with the module, else Quickshell’s own log (qs log -c quick-key).
First change
Add a row of your own. Start from the starter’s entries in ~/.config/quick-key/config.json (Extend the starter), then append one to menu.entries:
{ "key": "s", "desc": "Screenshot", "icon": "", "cmd": "grim" }
With Nix, the config that owns a tool adds its entries next to it (lib.mkOrder keeps the top level in order), so the menu grows with the desktop rather than in one file.
Next
- Recipes: short configs to adapt, from a command to a plugin.
- Configuration: themes, defaults and what is kept.
- Plugins: status and actions from any command.
Recipes
Short configs for the common shapes, each to adapt. They are written for programs.quick-key.settings; a plain config.json takes the same keys. <glyph> stands for a Nerd Font glyph.
Extend the starter
Each recipe adds to the starter menu. Setting menu.entries replaces the starter’s entries whole, as setting a bar slot replaces its items, so begin from the starter’s, read from the flake’s source:
{ inputs, lib, ... }:
let
starter = (lib.importJSON "${inputs.quick-key}/packages/quick-key/menu.json").menu;
in
{
programs.quick-key.settings.menu = {
entries = starter.entries;
bar.right = starter.bar.right;
};
}
A recipe’s entries and bar items then join them from any module, in the order lib.mkOrder gives. Without Nix, copy menu.json to ~/.config/quick-key/config.json and add each recipe’s entries to its menu.entries, its bar items to menu.bar.
The menu
Run a command
menu.entries = [
{ key = "l"; desc = "Lock"; icon = "<glyph>"; cmd = "loginctl lock-session"; }
];
The menu closes as it runs; keepOpen = true keeps it open, for a command you repeat.
A level of commands
{ key = "s"; desc = "Screenshot"; icon = "<glyph>"; submenu = [
{ key = "s"; desc = "Screen"; icon = "<glyph>"; cmd = "grim"; }
{ key = "r"; desc = "Region..."; icon = "<glyph>"; cmd = ''grim -g "$(slurp)"''; }
]; }
Power and brightness
{ key = "p"; desc = "Power"; status = "powerProfile"; list = "powerProfiles"; submenu = [
{ key = [ "Left" "Right" ]; desc = "Brightness"; action = "brightness"; }
]; }
Both are built in, so neither needs a command: the profiles take the digits, the one in use shown beside the label, and ←→ step the backlight as they step the volume.
Open an entry from a compositor key
// niri
Mod+P { spawn "qs" "-c" "quick-key" "ipc" "call" "menu" "toggleEntry" "d"; }
d is the entry’s key. With Nix, Mod+P { spawn-sh "${config.programs.quick-key.exec.ipc} menu toggleEntry d"; }.
Keep a device on its digit
pins go on the starter’s Audio output, so this takes the place of entries = starter.entries in Extend the starter:
menu.entries = map (entry: if entry.key == "a" then entry // {
pins = [
{ match = "alsa_output.pci-*"; label = "Speakers"; }
{ match = "bluez_output.*"; label = "Headphones"; }
];
} else entry) starter.entries;
Pins take the digits from 1, dimmed while absent, so a 2 is always the headphones.
Clipboard history
plugins.clipboard = {
type = "command";
read = ''cliphist list | head -n 50 | jq -Rsc '{items: (split("\n") | map(select(length > 0) | {id: ., label: (split("\t") | .[1:] | join(" "))}))}' '';
# The item comes last, as $1: a function puts it where the pipe needs it.
select = ''paste() { printf %s "$1" | cliphist decode | wl-copy; }; paste'';
};
menu.entries = [
{ key = "v"; desc = "Clipboard"; icon = "<glyph>"; list = "clipboard"; }
];
/ filters the list as you type; cliphist and wl-clipboard go in extraPackages.
Status and toggles
A value beside a label
plugins.load = {
type = "command";
read = ''printf '{"detail": "%s"}' "$(cut -d' ' -f1 /proc/loadavg)"'';
};
menu.entries = [
{ key = "p"; desc = "Processes..."; status = "load"; cmd = "foot btop"; }
];
detail sits on the right of the label. A plain line (0.42) would take the label’s place instead.
A toggle that lights
plugins.nightLight = {
type = "command";
read = "systemctl --user is-active wlsunset";
show.active.active = true;
};
menu.entries = [
{ key = "N"; desc = "Night light"; icon = "<glyph>"; activeWhen = "nightLight"; keepOpen = true;
cmd = "systemctl --user is-active -q wlsunset && systemctl --user stop wlsunset || systemctl --user start wlsunset; qs -c quick-key ipc call nightLight refresh"; }
];
A read source is read as the menu opens, so the command asks for another read once it is done. A tool with events needs none: give it as watch.
Pick one of a few
plugins.displays = {
type = "command";
read = "display-layout get"; # prints the id in use
select = "display-layout set"; # given the item's id
items = [
{ id = "laptop"; label = "Laptop only"; icon = "<glyph>"; }
{ id = "external"; label = "External only"; icon = "<glyph>"; }
{ id = "extend"; label = "Extend"; icon = "<glyph>"; }
];
};
menu.entries = [
{ key = "d"; desc = "Display"; status = "displays"; list = "displays"; }
];
The items take the digits; the one the source names is lit, and is what the entry shows.
Items that come and go
plugins.containers = {
type = "command";
read = ''podman ps --format json | jq -c '{items: map({id: .Names[0], label: .Names[0], detail: .Status})}' '';
select = "podman restart";
};
menu.entries = [
{ key = "c"; desc = "Containers"; icon = "<glyph>"; list = "containers"; }
];
The state line carries the items when the settings list none.
State a script writes
plugins.backup = {
type = "command";
file = "backup"; # under $XDG_RUNTIME_DIR
show.running = { text = "Backing up"; phase = "working"; };
show.failed = { text = "Backup failed"; phase = "error"; };
};
menu.bar.right = [ "backup" ];
The script writes running to the file as it starts, then empties it, or writes failed; the shell reads it on every change, with nothing running in between. The bar shows the text only while the file holds a state, and error turns it alert (The state line).
A VPN
plugins.vpn = {
type = "command";
read = ''tailscale status --json | jq -r 'if .BackendState == "Running" then "up" else "down" end' '';
show.up = { glyph = "<glyph>"; text = "connected"; active = true; };
show.down = { glyph = "<glyph>"; text = "off"; };
activate = ''tailscale status --json | jq -e '.BackendState == "Running"' > /dev/null && tailscale down || tailscale up'';
};
menu.bar.right = [ "vpn" ];
A click on it in the bar toggles it. For a key, give it one: { key = "v"; desc = "VPN"; status = "vpn"; } in a bar runs it on C-v. A NetworkManager or WireGuard connection is the same shape: read from nmcli -g GENERAL.STATE connection show wg0, toggle with nmcli connection up and down.
The weather
plugins.weather = {
type = "command";
# wttr.in's symbol for the sky, then the temperature: {"value": "m", "text": "+13°C"}
read = ''curl -sf 'https://wttr.in/Lisbon?format=%x+%t' | jq -Rc 'split(" ") | {value: .[0], text: .[1]}' '';
glyph = "<cloud>";
show = { "o".glyph = "<sun>"; "m".glyph = "<sun behind cloud>"; "/".glyph = "<rain>"; "//".glyph = "<showers>"; ".".glyph = "<showers>"; "*".glyph = "<snow>"; };
};
menu.bar.center = [ "weather" ];
Read as the menu opens. show picks the glyph by the sky, and its other symbols take glyph; with no network, glyph shows alone until the next read. Leave the place out (wttr.in/?format=...) for wttr.in to guess it from your address.
An external monitor’s brightness
plugins.monitor = {
type = "command";
read = ''ddcutil getvcp 10 --brief | awk '{ printf "{\"text\": \"%s%%\"}\n", $4 }' '';
};
menu.entries = [
{ key = [ "Left" "Right" ]; desc = "Monitor brightness"; icon = "<glyph>"; status = "monitor"; keepOpen = true;
cmd = [ "ddcutil setvcp 10 - 10; qs -c quick-key ipc call monitor refresh" "ddcutil setvcp 10 + 10; qs -c quick-key ipc call monitor refresh" ]; }
];
DDC is slow, a second or so a step; each step asks for another read once it is done, as the night light does.
A focus timer
plugins.focus = {
type = "command";
file = "focus";
glyph = "<glyph>";
activate = ''for m in $(seq 25 -1 1); do echo "$m min" > "$XDG_RUNTIME_DIR/focus"; sleep 60; done; : > "$XDG_RUNTIME_DIR/focus"; notify-send "Focus is over"'';
};
menu.bar.center = [ { key = "f"; desc = "Focus"; status = "focus"; } ];
C-f, or a click, starts 25 minutes. The bar counts them down from the file, and shows the glyph alone once the loop empties it.
The bar
In the bar
plugins.dunst = { };
menu.bar.right = [ "dunst" ];
A plugin in a bar shows its glyph, lit while active; a click calls its activate. Any command plugin works the same. For a key, give it one: { key = "d"; desc = "Do not disturb"; status = "dunst"; } in a bar runs it on C-d.
Text of your own in the bar
plugins.uptime = {
type = "command";
read = ''awk '{ printf "up %dd %dh\n", $1 / 86400, $1 % 86400 / 3600 }' /proc/uptime'';
glyph = "<glyph>";
};
menu.bar.center = [ "uptime" ];
The last line a command prints is the text beside the glyph. For text a script writes, give file instead (State a script writes).
A bar as islands
menu.splitBar = true;
Each of the bar’s slots sits on an island of its own. It is still the menu: it shows on a key and hides on ESC, so it does not replace a bar that is always there. Keep waybar for that, with theme.besideBars = true so the menu keeps clear of it. A bar at the top or down a side, or one that sizes itself to what it shows, is not on offer: a level keeps the bottom edge and its width.
The look
Colours from the wallpaper
A tool that writes a theme file is a theme: matugen’s template is the shipped theme’s keys filled from its palette.
{ "background": "{{colors.surface.default.hex}}", "foreground": "{{colors.on_surface.default.hex}}", "primary": "{{colors.primary.default.hex}}",
"alert": "{{colors.error.default.hex}}", "warning": "{{colors.tertiary.default.hex}}", "border": "{{colors.outline_variant.default.hex}}" }
matugen writes it to $XDG_CONFIG_HOME/quick-key/themes/matugen.json, theme.name = "matugen" picks it, and its colours apply as the file changes, nothing reloading. With Nix, which owns that folder, matugen writes elsewhere and the theme links to it, so the build knows it: xdg.configFile."quick-key/themes/matugen.json".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.cacheHome}/matugen/quick-key.json";. pywal works the same way, its template using {background}, {foreground} and {color1} to {color8}.
A look of your own
theme = {
name = "tokyo-night";
radius = 16;
itemRadius = 8;
surfaceOpacity = 0.85;
padding = 18;
};
The reference lists the theme’s sizes and opacities, each bounded by the check.
Configuration
Everything is optional. $XDG_CONFIG_HOME/quick-key/config.json holds what you change, grouped by feature like waybar’s modules (clock, audio, battery, …), a plugin’s under plugins.<name>. The shell reloads it on save; a save that is not JSON (a typo, a write caught halfway) leaves the running config in place and says so in the menu’s top level. With Nix, programs.quick-key.settings writes it as given. The reference lists every setting and its default.
{
"theme": { "name": "nord", "monospaceFont": "JetBrainsMono Nerd Font" },
"clock": { "format": "%A, %-d%o %B %H:%M" },
"plugins": { "vpn": { "type": "command", "watch": "my-vpn-status", "activate": "my-vpn-toggle", "show": { "up": { "active": true } } } }
}
What you choose while logged in is kept over a reload or a restart: keep awake, unsent drafts, a list’s order, an open conversation.
The defaults are a suggested setup, not a ceiling. Sizes given in pixels that you leave unset follow theme.fontSize (theme.iconSize, menu.width), so a larger font keeps the proportions; what you set, an entry’s width included (the starter’s too), stays in pixels as given. The check bounds each value, and the layout keeps every surface within its screen (no margin past a quarter of it, no menu taller, no more columns than its width holds), so no setting breaks the menu or its keys.
menu.splitBar draws each bar slot on its own island; the gaps take width, so a crowded bar needs a wider menu.
Checking
qs -p <the shell's folder>/check.qml checks config.json and shows nothing. It prints what is wrong (a setting that does not exist, a value of another kind, a menu entry or plugin that cannot work) and exits 1. The shell logs the same as it starts. With Nix, the module runs it as the configuration builds, so a wrong setting fails the build, not the session; the shell’s folder is the package’s share/quick-key. A plugin linked out of the store (mkOutOfStoreSymlink) is beyond the build’s reach, so its own settings go unchecked. Without a display, as in CI or over SSH, run it with QT_QPA_PLATFORM=offscreen.
Themes
theme.name picks a theme: a file of yours, else a shipped preset. A theme holds five colours, and optionally border, bubble and bubbleText:
{ "background": "#2e3440", "foreground": "#d8dee9", "primary": "#88c0d0", "alert": "#bf616a", "warning": "#ebcb8b" }
A colour set in theme itself wins over the theme’s. Colours are #rgb, #rrggbb or #aarrggbb (alpha first, as Qt reads it); one that is not is skipped with a warning. Anything that writes the file works: your editor, a matugen or pywal template for colours from the wallpaper (recipe), or, with Nix, programs.quick-key.themes.<name>. Saving it applies it at once. A misspelt name logs a warning naming the presets, and fails the build on Nix.
With stylix, the module themes the shell like one of stylix’s own targets: on whenever stylix themes every target (stylix.autoEnable), else with stylix.targets.quick-key.enable = true. It writes its colours as a theme named stylix (border from base03), picked unless you name another, and sets the monospace font and the popups’ font size and opacity, each a default your own theme settings override. Stylix’s popups are opaque by default, which hides the background blur; stylix.opacity.popups = 0.92 keeps it.
glyphs overrides any icon by its name in the kit’s Glyphs, in the shape of its default: one glyph, a list (batteryLevels, one per 10%), or a map ({ "audioDevices": { "headset": "" } }).
Defaults
Unset, the menu is a starter one (audio, network, Bluetooth, music), with the calendar on the clock, and the tray and the session in its bar. Volume, mute, Wi-Fi and Bluetooth power, and playback are built-in actions (see Menu), no tool needed. The rest use standard tools from PATH, which the Nix module puts on the shell’s PATH ahead of the session’s, so they resolve the same on every machine:
| Feature | Tool |
|---|---|
| Brightness | the first /sys/class/backlight device, busctl |
| Bluetooth, when rfkill blocks it | rfkill |
| Keep awake | none: Wayland’s idle inhibitor, which the compositor holds for every idle daemon |
| Power profiles, where their daemon is | busctl, to see it on the system bus |
| Session | loginctl, systemctl |
| Calendar reminders | notify-send |
| Battery warnings | notify-send |
The ask plugin’s notifications | notify-send |
popups.show lists what pops up as it changes, so another on-screen display can take any of it over. A plugin pops up as a pill with its glyph and text on every change of its text, so list only plugins that change rarely (not a recording’s timer). None shows while a menu or panel is open, which shows the value itself.
Setting menu.entries replaces the starter menu (Extend the starter). Do-not-disturb (the dunst or mako plugin, or your own) and display layouts are plugins you list (Plugins).
Menu
The menu is a list of levels, each drawn in the body. Beside it sit an optional bar and input, on islands stacked up from the screen’s edge.
A body holds one thing. It is either entries, each a key and a label that does something or opens a level, or a level’s content: a list, or a view such as the calendar. A content level’s own entries and its legend sit on its bar’s left, so a list that grows never moves them. When they do not all fit, each shows only its key and glyph, its label as its tip. The bar also holds what you glance at.
{
key = "a";
desc = "Audio output";
status = "sink"; # on the right of its row: the output in use and its volume
list = "sinks"; # its level lists the outputs, on digits, each with its volume
submenu = [ # and its actions, on letters
{ key = [ "Left" "Right" ]; desc = "Volume"; action = "sinkVolume"; }
{ key = "m"; desc = "Mute"; action = "sinkMute"; }
{ key = "c"; desc = "Configure..."; icon = ""; cmd = "pavucontrol"; }
];
}
Keys
Letters are actions and digits are list items.
- A letter runs its entry or opens its level.
- The islands on screen hold one key map, no key on two of them, and a key goes to the island that shows it wherever the cursor is: under
[ "input" { level = "t"; } "body" "bar" ],2ticks the second task andaopens Audio output as the menu opens. The check refuses two things on one key on one screen: two lists (pinned, or one pinned on a level that lists), a pinned level’s letter on one of the body’s or its row on a bar key with Ctrl, a key the view takes on a row or a pinned level. - One island has the cursor: the body, or a pinned level once its key (on the level that pins it) or a click gives it the cursor. Its arrows,
RETandM-RETact there, and the input is its own; the others show no cursor./filters a pinned list and gives it the cursor, as the filter is typed in the input. The bar’s left shows the actions and legend of the island with the cursor;?lists every key on screen. What a pinned level opens (an item’s own menu,0) opens in the body, and stepping back gives it the cursor again. ESCis the one way back, as in a launcher. It clears what you typed, then leaves an input for its island, closes the filter or a focused event, gives the cursor back to the body from a pinned level, then returns where you came from (the level above, or the panel or input that opened it), and at the root closes the menu. It never stops or answers anything.DELonly deletes. A level opened on its own, by a shortcut or a key path, is a root.- Digits pick from a level’s list;
Alt+digitopens an item’s own menu (a tray app’s). - On a level whose entries leave the arrows free, they move a cursor. On a list,
↑↓move over the rows shown, the first from the item in use. On a menu’s rows,↓↑move a row and←→one, as laid out, the first onto the first row or the last; each pair moves only where the level binds neither of its keys. The cursor stops at the edges, but↑↓past an island’s first or last row move it onto the nearest row of the island above or below, where that one leaves the arrow free too: never into an input or a view, and←→never cross.RETruns its row as its key would, a capital’s too (on a pair, nothing, as a click), andM-RETan item’s own menu. A list’s legend names whatRETdoes; on a menu’s rows?does, so the bar holds still. Back on a level,ESCfinds its row where it was. Digits keep their items, and a key path never moves the cursor. Ctrlreaches the bar wherever the keys are, an input or a filter included where its text leaves the key: a bar entry withkey = "c"runs onC-c, a list in it onC-1toC-9, andC-M-1opens an item’s own menu there. HoldingCtrlfor a second lists the bar’s keys in place of the body, as icons alone cannot say what they run.- Two keys with a command or action each (
[ "Left" "Right" ]) share a row, named for what it changes (Volume,Track). The first steps down or back:←→is less then more or back then forward,↓↑less then more, and↑↓back then forward, up going back in time as on a scrolled page. Held, a pair repeats on its level, never into the level it opens; a letter or digit acts once. - Device levels put Power on
pand Configure… onc, and what ends the session takes Shift on its own key (Reboot, Shutdown). CtrlandAltmay prefix a key in the body (Ctrl+Left, as niri writes bindings) where its bar does not take it. A modifier never runs the plain key, Shift only picks the capital letter, and Super stays the compositor’s.- Hints show keys Emacs-style:
C-Ctrl,M-Alt,s-Super, Shift as the capital letter, symbols for the arrows,DELfor Backspace andESCfor Escape (C-←→,s-k). - Holding
Superfor a second lists each bar entry’sshortcut, the compositor key bound to it. ?lists the keys no row of any island shows, where they act: each hold while it lists something, each pinned level’s key, the arrows where they move a cursor,RETon a menu’s rows,M-1while an item has its own menu,ESCand, where an input shows,TABandC-S-RET. Any key closes it. Every bar but the filter’s shows? keys, as every surface with such a list shows its key there;menu.keysHintoff leaves these out, the keys still acting. A level’slegendnames those of its keys to show in its bar too ([ "Ctrl+Up" ]), as which matter is yours to say.menu toggleEntry <key>over IPC opens a top-level entry, in the body or the bar, for a compositor shortcut; a pinned level it gives the cursor, closing the menu if it has it.keepAwake toggleover IPC switches keep awake without the menu, andkeepAwake enableturns it on, for a script.menu press "<path>"runs a key path from the top level as typing it would ("a 2","Ctrl+x", keys named as entries declare them), so a binding reaches anything the menu does. A key that closes the menu ends the path. A path that opened the menu closes it after the action it ends on, unless that entry setskeepOpen = true. A digit is the same item only while it is inpins. A path runs the same through a pinned level (t 2), and its keys need no path through it (2).menu keysprints every path as Markdown.
What an entry does
One of:
cmd: a shell command. The menu closes, unlesskeepOpen = true.action: a built-in action (below), or one of the plugin its level lists (the tasks’sort). It brings its icon, which shows its state (Wi-Fi off), and what lights it, keeps the menu open, and dims while it has nothing to act on (no player, no adapter). What can never run on this machine is not declared.submenu,listorview: a level.listadds items found at runtime on digits.pinskeeps chosen ones on their digit, dim while absent, their label naming them wherever the menu shows them; the rest follow by name, internal audio first, never by signal or recency.view = "calendar"shows the calendar.
The label is desc, and never changes. The icon is icon, or its status’s or action’s own; the starter gives every row one.
status shows live state on the right of the row, or beside the label for an action in its level (Brightness 55%). A status names its state in words only when it has no value to show, in lowercase but for a name (off, muted, Wi-Fi off), and never for a state its icon or tone already shows. A level’s state sits on the row that changes it: power in Power’s icon.
format picks a status’s fields ("{song}"), and what follows a | stays whole on the right ("{title}|{when}"). A built-in status has a format of its own (the volume’s is "{device}|{volume}"), which an entry’s replaces.
activeWhen lights an entry of your own. A bar entry showing a plugin’s status with no cmd or action activates the plugin, on a click or its key.
A level is as wide as its entry’s width, else menu.width, and lays its actions out in its entry’s columns, else menu.columns (columns = 1 for a level of three, so none sits alone). Neither is measured from what it shows, so it holds still. Entries flow across, so order decides neighbours. At the top the columns are equal, so values line up; in a level the last hugs its rows against the right edge. It is never wider than the screen, whatever it asks; short of room, text shortens, short values last and icons never. Make the menu wider before adding columns or truncating.
A level’s body fits what it shows, unless its entry’s height, else menu.height, gives it at least that many rows (height = 5): as tall as five of its rows, its far side left blank, and taller only for more. A body that fits moves what lies farther from the edge as levels change; a height holds it still. A view fits, and a pinned level fits its rows.
The menu sits at the bottom of the screen, centred. menu.layout lists its islands top to bottom, the last against the edge: by default the input, the body, then the bar ([ "input" "body" "bar" ]). [ "body" "input" "bar" ] puts the input between the body and the bar. An island with nothing to show (a level without an input, a bar without content) shows empty and holds its place; only islands at the far end may stay out, since nothing lies beyond them. Every layout has the body, once; leave out input and no level has an input or a filter (a picker still lists, its arrows moving, with no query to type), leave out bar and no level shows its bar, though its keys still act. A plugin’s panel sits where the menu does. Nothing else moves: every level keeps the bottom edge.
{ level = "t"; } makes the top-level entry on t a pinned level, drawn on its island, its row leaving the body: [ "input" { level = "t"; } "body" "bar" ] keeps your tasks above the top level’s rows. A pinned level belongs to the level that pins it, as its row did: it shows there only, steps aside on every level opened from it, and comes back with ESC. It is as wide as its entry’s width, else menu.width, and never shrinks while it shows. A pinned list shows up to its limit items on digits (nine unset), past it 0 listing them all in the body. Its status, format, bar and layout would show nowhere, so the check refuses them.
An entry’s layout is its level’s, as menu.layout is the top’s, until ESC leaves that level and the layout and island with the cursor before it come back. An entry without one opens in the body of the layout showing. A pinned level in it names a key of that entry’s level, so a pin below the top level is declared in its own level’s layout (layout = [ "input" { level = "e"; } "body" "bar" ];).
Bars
menu.bar.left, center and right are the top level’s bar, like waybar’s modules. An entry’s bar is its level’s, with the same slots. A bar holds content (a song, its modes), never a title. A slot holds entries and, by name, statuses and plugins (a click calls a plugin’s activate). A crowded bar shortens its text, whole on hover, then shows actions by their glyphs alone, named with their value on hover, the value staying while it warns; it never widens the menu, so one that still cannot fit runs past it, and the log says how wide it needs the menu.
In a bar, an entry shows its status, else its icon, else its desc, dimmed, and may do nothing but show its status. With both, it shows its icon in the tone of what its format shows, a spinner while the status is busy, and its value on hover, beside it too while that tone warns or where the value is the point (the keyboard layout). So a Sync button stays out of the way until its sync is under way or stale (Calendar).
An entry with a list shows each item: the tray shows each app’s icon, up to its limit (nine at most), and past that +N on C-0 shows them all on a level of their own. An app’s own menu has a bar of its own: the app’s icon and name, and the submenus opened since (blueman › Plugins).
menu.bar.left = [ { key = "c"; desc = "Calendar"; status = "clock"; view = "calendar"; } ];
menu.bar.right = [ "battery" { desc = "Tray"; list = "tray"; limit = 5; } ];
Dates and times are said one way everywhere, in clock.locale: a time as the locale writes it (14:30, 2:30 PM), a day as yesterday, today or tomorrow, its weekday within the coming week, else its date (3 Nov), with its year when not this one. Short names are cut to three letters where that still tells them apart (Sep, not Sept). Only dates and times follow it: the shell’s own words, today and tomorrow among them, stay English.
Input
An entry’s input gives its level a line of text on the input island, a bar entry’s and a pinned level’s too. menu.input gives the top level’s, a catch-all for what belongs to no level (menu.input = { desc = "Ask..."; plugin = "assistant"; }). The island shows the input of the island with the cursor; with none, its prompt’s glyph dimmed.
An input takes letters only while focused, so keys hold still. TAB goes to the input of the island with the cursor, then to each other input on screen top to bottom, then back to the rows it left, and S-TAB the other way round; a click focuses an input too. RET sends and keeps it focused, C-S-RET sends and closes the menu, and ESC clears it, then gives the cursor to its island. Unsent text stays until sent or cleared, closing the menu too. Focused, its keys show on its right. Empty, it shows its desc, which ends in ..., as what waits on you does.
The text goes to cmd as $1, else to plugin, else to the plugin the level lists (tasks adds it as a task). What a plugin makes of it shows on the input island until done (a task until listed), and the island never shrinks within the visit. The config says where text goes; how the write is done (order, retries, reporting) is the command’s, never a new field.
{ key = "k"; desc = "Tasks"; status = "tasks"; list = "tasks"; input = { desc = "Add a task..."; }; }
context is what a plugin is told beside each message, on a line of its own; the conversation shows the text as typed. Word it as where the text comes from, not as an order, since a reply to the agent’s question carries it too. after runs, given nothing, once the write is done: cmd exiting 0, a task added, Ask answering. A command reports its own failure (notify-send).
Given to Ask, the input’s island is the working area and the body the committed one. The turn shows above the prompt: what you sent as a bubble on the right, the answer as text on the left, with a spinner while it works. Then the level redraws with what happened. The island starts at a line each and grows away from the screen’s edge, never shrinking within the visit. The prompt says what RET does next (“Reply…”, nothing while it works). While you stay on the level, the next send continues the conversation, whichever island has the cursor; leaving or closing ends it.
An answer the island cannot hold (past three lines, a table, an approval) opens the whole conversation in Ask, and ESC there comes back. A click on the turn opens it too, where C-C copies the answer. A failure shows in alert, what you sent faded and given back, selected: RET retries it, typing replaces it. C-S-RET leaves the answer to a notification.
An input writes, never filters. Put an agent’s input only on a level showing what it changes:
{
key = "c"; desc = "Calendar"; status = "clock"; view = "calendar";
input = {
desc = "Add an event..."; plugin = "assistant"; after = "calendar-sync";
context = "From the menu's Calendar input: an event to add, or an answer to your question";
};
}
Mouse
The mouse reaches what the keys do. A click runs a row or a bar item. A right click opens a tray app’s menu or, beside the rows, goes back a level. The wheel steps a pair (volume, brightness), up as its second key, or the calendar’s month. Over a row that opens a level, it steps the pair its status adjusts (Audio output’s volume); a command pair there steps only on its own row. Resting on an icon in a bar names it.
Built-in names
Each of status, list, action and activeWhen takes a built-in name or a plugin’s, and view a built-in. The reference lists them, generated from the shell: statuses and their fields, actions, lists, states for activeWhen, and views. A plugin’s status gives format its text, detail and fields of its own.
A digit on streams picks the app streamVolume and streamMute change, the first until you pick; the starter gives them Left and Right.
The wheel over a device or an app changes its own volume. Where audio.max allows past 100%, a volume’s meter is full at audio.max, and a step up never lowers a volume set past it elsewhere.
The Wi-Fi list scans for networks while it is open, and a network or device shows a spinner as it connects or disconnects. The network’s glyph follows the signal. Behind a captive portal or with no internet it warns, internet saying so. The wifi action dims while a hardware switch blocks the radio.
Music follows music.player, else the player playing, else the last that played. A stream that packs song and artist into its title (some radios send an XML document) is split by music.titleMatch, since MPRIS leaves no glue to do it in.
Power profiles (power saver, balanced, performance where the machine has it) are offered only where their daemon, power-profiles-daemon or tuned-ppd, is on the system bus, which daemons.list reads as the menu opens. Without it the action dims, the list says so and the status shows nothing.
A level lists up to nine items on fixed digits. While the list holds more than the rows show, the legend says how many (/ 1-9 of 14). An empty list says why: off, or nothing found.
/ filters the list in place, as in a pager or a browser, unless the level binds / itself. The filter takes the level’s input and keeps the items whose label holds every word typed, case and accents aside (cafe finds Café), hidden ones too. They show in the rows’ place, as many as the level showed, so nothing moves.
While filtering, digits pick from the rows shown and never type. ↑↓ move the cursor, starting where it was at rest, PgUp and PgDn a page of rows, RET runs its item as its digit would, and M-RET opens its own menu. The filter’s range sits on its right (2-10 of 14). ESC clears the filter, then closes it, and with it a level opened only to filter; the cursor stays on the row its arrows moved to.
A level’s other pickers take any free key (. or a letter), their labels ending in ....
Calendar
view = "calendar" gives a level a month and, beside it, the events from the selected day on.
Keys
- Arrows move the selected day by a day or a week,
Ctrl+↑↓by a year.?lists these rather than the bar, as the grid shows the arrows. Ctrl+←→moves a month,tgoes back to today.Returnsteps into the events: the arrows then move through them, the month following, andESCreturns. On an event,Returnshows it whole in the events’ place, its title and place unshortened and its end to the minute, untilESC.
A dot under a day marks each colour of its events, up to four; with more, the last is grey. The month and year head the grid, its keys sit on the bar, and a failed sync says why under the events.
The calendar status shows when the next event is, timed ones first, so a daily all-day event does not hold it; one under way says when it ends (to 12:00). Its fields are title, when, more: how many timed events start later today besides it (+2, empty with none), and updated: how old the events are, or syncing... while a sync runs. A Sync button in the level’s bar shows only its icon, spinning while the sync runs, updated on hover; past calendar.staleAfter it turns warning with updated beside it:
bar.right = [ { key = "s"; desc = "Sync"; icon = ""; status = "calendar"; format = "{updated}"; cmd = config.programs.quick-key.calendarSync.exec.sync; } ];
Once something writes calendar.file, put "calendar" in the top bar beside the clock, so the next event shows without opening the month; a format names what it shows, shortened when the bar is crowded and whole on hover, what follows its | staying whole. Setting menu.bar.left replaces the starter’s clock, so it names that too:
menu.bar.left = [
{ key = "c"; desc = "Calendar"; status = "clock"; view = "calendar"; }
{ desc = "Next"; status = "calendar"; format = "{when} {title}|{more}"; }
];
Events
Each day heads its events, with its year when not this one. A timed event takes one line, 09:00–09:15, and its place a second. One running past its day says when it ends (to Sat 18:00), or only the date a week or more on (to 3 Dec), and the days it fills are all day. What is over dims, and today’s timed events that are over fold into one line (3 earlier) until the arrows reach one. Today opens under its heading, or at its first timed event not over yet when the day’s start would still leave it out of view, and any day, the last included, scrolls to the top. A row that does not fit whole is not drawn. On a level too narrow for titles beside the times, the times fold into each title’s second line.
The events file
The shell only reads calendar.file, watching it for changes; until it exists, the month shows alone. calendarSync writes it from a list of calendars (vdirsyncer, khal), but anything that writes this works:
{
"updated": "2026-11-12T14:30",
"synced": { "from": "2026-09-11", "to": "2027-11-12" },
"error": "personal: could not sync",
"events": [
{ "title": "Dentist", "start": "2026-11-12T14:00", "end": "2026-11-12T15:00", "color": "#4285f4", "location": "Rua Augusta 120" },
{ "title": "Trip", "start": "2026-11-20", "end": "2026-11-22", "allDay": true, "color": "#33b679" }
]
}
- Times are local, without an offset. An all-day event’s
endis its last day. - A repeating event is one entry per occurrence.
syncedis the first and last day the events cover: a day past them saysNot synced, notNo events. Without it, events show only within a year of today.uidtells apart two events alike in title, time and colour, so the keys reach each.uid,location,synced,errorandsyncing: trueare optional.
calendar.remind reminds of each timed event once, calendar.remindBefore minutes before it starts, a restart of the shell repeating none.
calendarSync
calendarSync.enable syncs 62 days back and a year ahead, from the calendars listed in calendarSync.calendars, and writes that range as synced. Cancelled events are left out. A sync that fails retries a minute later, then ever less often, up to every half hour.
Tasks
The tasks plugin lists tasks on digits, and a digit ticks one off or unticks it. A level’s input adds a task by its title, raw, to the first list (see Input).
A tick shows at once. An added task shows at once in the input, with a spinner until its command is done and the file lists it, no row moving under the keys meanwhile, so a command that reads a date out of the text (an agent) shows it is working. Each command runs after the ones before it, and a press while its task’s command waits takes that command back, so a task has at most one command running and one waiting. One that fails shows the file’s state again and says so in the level, as a failed sync does, until the menu next opens; a tick the file still does not have five seconds after its command shows the file’s state again too.
Its status counts the late tasks beside an alarm, in the warning tone, when there are any, else the open tasks due by today, up to 9+. Its fields are title (the most urgent: late first, then by due, whatever the sort), count and updated.
plugins.tasks = {
file = config.programs.quick-key.calendarSync.tasksFile;
inherit (config.programs.quick-key.calendarSync.exec) done reopen add sync;
sort = "due";
completed = "hidden";
};
menu.entries = [ { key = "k"; desc = "Tasks"; status = "tasks"; list = "tasks"; submenu = [
{ key = "s"; desc = "Sort"; action = "sort"; }
{ key = "c"; desc = "Done"; action = "completed"; }
]; } ];
sort orders them: due (undated last), priority (highest first, unset last), title, or list (by list, then due). Under each, those done before the menu opened come after the open ones. completed says what the done ones show: hidden hides those done before the menu opened, still found by filtering (/); shown shows them; only shows only them, each with when it was done in place of its due date. The plugin’s sort and completed actions step through these, kept over a restart, the one in use beside them (Sort by due date, Done hidden) and as their icon (the glyphs sorts and completed, by value).
A task’s due date is on its right, after its priority as a glyph (the glyphs priorities: high for 1 to 4, low for 6 to 9, as iCalendar groups them; medium, 5, shows none), and its list’s colour as a dot at the end while the file holds more than one list. A task is late once its time has passed, or the day after its date when it has no time: in the warning tone, with an alarm before its date. A ticked task keeps its digit, dim and struck through, so the same key unticks it. With none, the level says so.
remind, given a task’s title and its time, runs once as each timed task falls due. One that falls due unseen, the machine asleep or the shell off, runs at the next minute; a new session skips those already past.
The file is read on every change. Opening the menu syncs once it is syncAfter minutes old, and every tick syncs after it. Past staleAfter minutes its last sync shows in warning, and a Sync button in its level’s bar shows it as the calendar’s does (Calendar).
The tasks file
One line, so the plugin reads it as its state:
{"updated": "2026-11-17T14:30", "error": "personal: could not sync", "tasks": [
{"id": "12", "title": "Pay the electricity", "due": "2026-11-20T18:00", "done": false, "list": "personal", "priority": 1, "color": "#ff8c00"},
{"id": "13", "title": "Call the plumber", "due": "2026-11-18", "done": true, "completed": "2026-11-17T09:12", "list": "personal", "color": "#ff8c00"}]}
updatedis when the lists last synced, left out until one has;erroris why the last sync failed. A tick or an add writes neither anew, so a file that cannot sync shows its age.- Times are local, without an offset; a due date without a time is due that day.
idnames one task and stays the same after a tick;doneandreopenare given it, withtitle.priorityruns from 1, the highest, to 9; unset or 0, none.- It holds the open tasks, and those done in the last 14 days, so a mistaken tick can be undone and
completedhas some to show.
calendarSync
A calendar with tasks: true in its list syncs both ways over CalDAV, so a tick or an added task reaches its server; the others are only read, and new tasks go to the first. exec.done, exec.reopen and exec.add are the tasks plugin’s commands.
calendarSync reads its tasks with todoman, whose config it keeps beside the events (todoman.py), so todo --config on that file sees the same tasks. A tick edits the task’s file, changing only its status, completion and percent done; todoman, which writes a task anew from what it reads, only adds a task and ticks off a repeating one. A task’s id is its title, as todoman numbers tasks anew as their files change; two listed tasks of one title take todoman’s number instead. A tick acts on the one task the file lists with its title, open for a tick and done for an untick, else fails (“tasks changed, try again”), touching nothing. Two such tasks of one title fail too, as the title cannot tell them apart, and so does a file holding more than one task (a series with instances of its own): tick them in your calendar app.
Ticking a repeating task makes its next one; unticking reopens only the one ticked and leaves the next, to delete in your calendar app if unwanted. todoman writes both anew: the one ticked loses a start not before its due time, a language, categories on two lines and its times’ zone, and the next one also loses its reminders, its links (URL, RELATED-TO) and an app’s own properties (X-), its COUNT starting over, so a series meant to end never does. Your calendar app keeps a series whole; tick repeating tasks there.
A tick or an add and a sync’s rewrite of the file take turns, and neither waits on the network. One made while a sync runs, which that sync may have missed, makes it sync again as it ends.
Ask
A panel to ask an agent something without leaving what you are doing. It opens where the menu does, in the same frame, and opening either closes the other. Its prompt sits under the conversation with the keys, and names who it asks until a turn says what RET does next. Its keys sit in the bar beside the top level’s statuses. An answer that comes while the panel is hidden arrives as a notification, unless the menu shows it above the input that sent it, which a pinned level taking the cursor or a panel covering the menu hides. Once that input shows it again within the visit that sent it, it is read.
ask is the agent: a command speaking ACP on its stdio. It starts with the first turn and stays for the next, so a turn skips its start and its session’s loading. After idle minutes without a turn it stops, and the next turn starts it again. An agent sees an ACP client as a code editor unless told otherwise, so an assistant may reach for a terminal and files: give its ACP sessions the tools and brief it has elsewhere (with Hermes, platform_toolsets.acp and agent.coding_context).
The answer streams in as Markdown, ACP’s text format and the one text the shell renders rich. The conversation renders it, fetching nothing and running no HTML: an image shows as its alt text. The menu’s island shows it plain.
# Claude, through Zed's ACP adapter; `open` resumes its session in a terminal.
plugins.ask = { title = "Claude"; ask = "claude-agent-acp"; open = "foot claude --resume"; };
# An agent on another machine, its stdio over SSH; a sync after any tool that writes the agenda.
plugins.ask = { ask = "ssh host hermes-acp"; cwd = "/srv/agent"; toolMatch = "^mcp__agenda__(?!list_)"; toolRun = "calendar-sync"; };
A turn resumes the session (session/resume, else session/load), or starts one and says so when the old one is gone. Approvals are the agent’s permission requests, shown one at a time. Stopping cancels the turn, and an agent still answering two seconds later is stopped; the next turn waits for it. A failure ends the turn in alert, saying why (“Sign in to … first”, the agent’s own error), and the agent’s stderr goes to the journal.
| Tested with | Version |
|---|---|
| ACP | protocol v1 |
Hermes Agent (hermes-acp) | 0.22.7 |
Other ACP agents (Claude through claude-agent-acp, Codex through codex-acp, Gemini CLI, OpenCode, Goose) speak the same protocol and are untested here.
Keys:
RETsends.C-S-RETsends and hides the panel, the answer arriving as a notification.S-RETbreaks the line.ESCclears the prompt, then steps back: to the menu that opened the panel, else hiding it, as a click beside it does. The conversation is kept.C-cstops the run, cancelling what it waits to be allowed, and keeps what it had answered so far. Leaving never stops it.C-yallows an approval once andC-ndenies it, the run going on. Neither answers for good: an agent offering only that hears the request cancelled. Each stays in the conversation as a dim line.C-lstarts a new conversation,C-omoves it to a terminal, andC-r, between turns, lists past conversations.C-C(Shift withC-c, as terminals copy) copies the last answer, andPgUpandPgDnscroll the conversation. The prompt keeps the keys throughout, and the bar shows only those that act now.C-?,?with Ctrl since the prompt has the keys, lists the rest in the conversation’s place. Any key closes the list. Itslegendsetting names those to show in the bar too ([ "Page_Up" "Page_Down" ]).
A question from an input starts a new conversation, as a quick-entry window does, the one it leaves staying in the agent’s own list. History is that list (ACP’s session/list, in cwd), in its order, each with its last activity, filtered in the menu as a shell’s reverse search is. RET resumes one, its history replayed (session/load), and its own menu (M-RET) has o, which opens it in a terminal. An agent that cannot load them dims them, and one that cannot list them says so. An input that gives Ask its text takes C-r too.
Its status shows its glyph only while it has something to report: a run, an unread answer, an approval waiting on you. To ask from a key, bind menu press Tab: the menu opens with its input focused. Two agents are two plugins with type = "ask", and a level’s input may hand one its text (see Input).
Compositor
The core asks the compositor for three things, through Compositor, and nothing more:
- The outputs connected and the outputs on, each by connector name and by make, model and serial (what
brightness.panelnames). - The keyboard layouts, the current one, and switching to the next.
- The focused output, by connector name, which the pop-up follows.
A backend per compositor answers them, under services/compositor/, picked at startup from the environment (NIRI_SOCKET today; another compositor would add its own, such as HYPRLAND_INSTANCE_SIGNATURE). Without one, the Wayland backend answers: the outputs Wayland knows, only those on and by connector name only, and no keyboard layouts. A backend ships once it is seen working (design rule 10): niri today.
What only one compositor has stays with its backend (Niri: workspaces, windows, every event), for plugins built on it; such a plugin names its compositor (the workspace map is niri’s). What the compositor is told (keys, layer rules, outputs) lives in the Nix modules, never in the shell.
Each surface is a layer of its own namespace, for the compositor’s layer rules (blur, a block on screen capture): quick-key-menu, a plugin’s panel as quick-key-<name>, quick-key-osd, quick-key-recording-indicator and quick-key-dictation-indicator, quick-key-minimap, quick-key-keep-awake, and quick-key-dismiss, the click-away area under an open surface. The menu and a panel cover the screen and draw only their cards, so a rule over the whole surface (a shadow, blur without ignorealpha) acts on the screen.
Plugins
A plugin adds a status, a list or a surface. List it by name under plugins, with its settings beside it. Nothing loads unlisted, and one that fails to load is logged and left out. Every setting is in the reference.
Without QML
Most plugins need no QML: type = "command", under any name the shell does not take: a built-in status, list or state, menu, drafts. A source gives a value, and show says how each value looks.
plugins.doNotDisturb = {
type = "command";
watch = "dnd-status --follow"; # prints true or false on every change
activate = "dnd-toggle"; # a click on it in a bar
show = {
"true" = { glyph = ""; tone = "alert"; active = true; };
"false" = { glyph = ""; };
};
};
For a fixed set of choices, items lists them, for an entry whose list is the plugin’s name. The source’s value names the one in use, select runs with the chosen id, and run with an item’s id and the key of an action from its own menu.
plugins.displayLayout = {
type = "command";
read = "displayctl status"; # {"value": "extend", "enabled": ["laptop", "extend"]}
select = "displayctl layout";
items = [
{ id = "laptop"; label = "Laptop only"; icon = ""; }
{ id = "extend"; label = "Extend"; icon = ""; }
];
};
Sources
A plugin’s state comes from one source:
watch: a command that runs for as long as it lasts, each line the new state. It must flush each line (stdbuf -oL,--line-buffered), and is restarted when it exits.file: a file holding the state, read on every change. Replace it whole, by a rename: writes in place a moment apart can be missed.read: a command whose last line is the state, run as the menu opens and onceactivateends.qs -c quick-key ipc call <name> refreshruns it now.
The state line
A line is a plain value (true, 45, /walls/sunset.jpg) or a JSON object, an empty one clearing the state. An object’s fields, each optional:
value: whatshowanditemslook up; a plain line is its value.glyph,text,detail,active,tone: the look, over whatshowgives the value.phase: its work, as Rex’s Program Status Protocol names it.idle;working, its icon spinning where a bar entry shows one;blockedon you, in warning;done, lit, a result not seen yet;error, in alert. A word it does not know isidle. Awatchthat ends takesworkingandblockedwith it and leavesdoneanderrorto be seen.enabled: the ids ofitemsthat can be picked; unset, all.items: items that change, when the settings list none, each{ id, label, icon, glyphs, detail, swatch, active, enabled, done, hidden, busy, tone, verb, closes, actions }:donedims it, struck through; it can still be picked.hiddenleaves the rows; filtering (/) finds it.tone(warning) marks one that needs attention, withglyphsbefore its detail so colour is not all that says so.busyshows a spinner for its icon while it is being made.swatch, a colour that is data (#ff8c00, a task’s list), is a dot at the end of its row.verbnames what choosing it does in the picker’s legend (tick), andcloseshides the menu first.actions,[{ key, desc, icon, closes }], are its own menu (M-and its digit,M-RETwhile filtering), each runningrunwith the item’s id and the action’s key.
empty: whyitemsis empty, shown in its place (No devices paired).
A line that is not a JSON object is logged and skipped. The shell ignores fields it does not know, and a plugin may read its own (recording’s since).
Shipped
List one by name to use it: plugins.niriMinimap = { };.
command: the state its source gives, as above, under any name.dunst: do-not-disturb for those who keep dunst as their notification daemon. A bell, struck and lit while dunst is paused; a click pauses or resumes it. Needsdunstctlanddbus-monitoronPATH(with Nix, add dunst toextraPackages).mako: the same for mako, through a mode nameddo-not-disturbthat your mako config hides notifications in ([mode=do-not-disturb]withinvisible=1). Needsmakoctlanddbus-monitoronPATH(with Nix, add mako toextraPackages).recording: a pill on every screen while recording, and the elapsed time as a status. Its source gives{"active": true, "since": <epoch seconds>}while recording.dictation: a pill while dictating, a spinner while transcribing. Its source givesrecording,transcribingor anything else for idle, as its value or as thestageitsshowgives (show.streaming.stage = "recording").niriMinimap: a minimap of niri’s workspaces as you move between them.tasks: tasks to tick off, from a tasks file (see Tasks).ask: a panel for quick turns with an agent (see Ask).
Writing one in QML
A plugin that needs behaviour (a timer, a surface, a protocol) is a folder, found in $XDG_CONFIG_HOME/quick-key/plugins/ and then among the shipped ones. type names it, by default the plugin’s own name, or gives a path to its file.
<Name>.qml, rooted atPlugin: its state and actions. It never draws.Settings.qml, rooted atPluginSettings: every setting it takes, with its default and a one-line comment, which is its entry in the reference. It is read as the configuration builds, so it must stay declarative; the shell creates it once to check the config and once to run the plugin.- One file per view it draws, listed in
views(["Minimap.qml"]). Each is given the plugin aspluginand only reads it. - A type of its own it uses by name (Ask’s
Acp), listed in aqmldirbeside it (Acp 1.0 Acp.qml), since the shipped folders resolve no type without one.
import qs brings Plugin, PluginSettings and Config, qs.ui the kit and qs.services the services. The smallest to start from is plugins/dunst/, all of it settings.
What it gets:
name,settings(its part of the config), andstate(the state line, withshowanditemsapplied).exec(setting, ...args)runs a command setting, its arguments as$1,$2after its text, which the check fails when it ends in;,&or|.call(setting, args, then)runs one and always answersthen(code, output)once done (127 when unset), so a second call never drops one still running; one that exits non-zero is logged with its last line on stderr.commandLine(setting, ...args)builds one for aProcess.- The theme (
Config.theme) and the menu’s settings (Config.menu), the kit, and the services:Audio,Network,Bluez,Power,Brightness,Music,Tray,Compositor,Nirifor niri’s own events, and:Picker:pick(list)shows a list by name, filtered, on a menu level of its own over the plugin’s panel, which Escape shows again.Panels, the stack of surfaces:topis the one showing,open(owner)shows a plugin’s panel on top,back()closes it to show what it covered, andclose()hides them all.Kept, what is kept by key over a reload or a restart:set(key, value)writes one, and aKeptValue { key }binds to itsvalue.
What it gives:
glyph,text,detail,glyphs(before the detail, in its tone),activeandtone, shown wherever its name is astatus, andfieldsby name for an entry’sformat.fieldTones: a tone per field, kept when aformatshows it ({ updated: "warning" }on an old sync).error: why its source or its last action failed, by default its state’s ownerror. A level listing it shows it beside its keys, inalert.activate()for a click on it in a bar, andrefresh(), called as the menu opens.press(path)for a key path on a surface of its own (<name> press "2 x"), run as typing it would; false if it takes none.items,select(id)andrun(id, key)(an action from an item’s own menu) for an entry whoselistis its name. An item may bring ameter(0 to 1).actions: actions by name, as the built-in ones ({ icon, detail, available, run }), which an entry of a level listing it names in itsaction(the tasks’sort).words: what only it says (its empty list, its failures). The words the surfaces share areWords’s, which a plugin never adds to.submit(text, after, context)for an input’s text when it sets nocmd, runningafteronce done;contextis the input’s, for an agent to be told beside the text. It answers false when it does not take the text, which the input then keeps.busywhile it takes no text shows a spinner in the input; a plugin sets itsphaseto working or blocked rather thanbusy.watchedwhile the menu shows an input giving it text, set as a visit starts, andvisitEnded(throughendVisit()) as it ends: the menu leaves the level or closes. The keys moving between islands end none.displayedwhile watched and its input is the one on screen: false while the keys are on a pinned level, whose input shows instead, or a panel covers the menu. Ask notifies an answer that comes then, and marks it read once its input shows it.turn, the conversation’s turn as the menu draws it while watched, null before the first:{ question, text, phase, kind, activity, table, steps }.phaseis a state line’s:working(withactivity),done,blocked(kindpermission),error(the input getting the text back), oridleonce stopped.stepsare what you answered on the way (an approval).recall()to show its past conversations filtered in the menu, forC-rin an input giving it text, whilerecalls: the picker opens over what asked for it.expand()to show the conversation in its own panel over the menu, when the answer over the input cannot fit it; stepping back shows the menu again where it was, the visit going on. It answers false without a panel.empty: why its list is empty, shown in its place; by default its state’s ownempty.shortcut, its compositor key.
Every plugin answers <name> activate, <name> refresh and <name> action <action> over IPC, the last running one of its actions as an entry naming it would.
Kit
What the core’s surfaces and the plugins are built from; a plugin that needs something new adds it here first. Reach for it before writing anything that draws: most of what reads as inconsistent (two words for one state, a gap that differs, a second spinner) is something drawn beside the kit.
| Need | Take |
|---|---|
| text, a word for a state or a key | Label, its words from Words |
| a colour, dimming | a tone (Tone) |
| a size in characters or lines | Metrics |
| a glyph, an image or a wait | Icon |
| a row to click | ListItem, StatusLine in it |
| a listed item (a task, a device) | ListItem |
| keys: one, a legend, a list | KeyHint, KeyLegend, KeyList |
| arrows over rows, a list or a grid | Cursor |
| text to type or send | TextArea, Prompt |
a conversation (qs.ui.conversation) | a Thread of Exchanges, Bubble and Markdown in each; an answer’s Markdown read through Markup |
| a surface the keyboard opens | a Stack of Islands |
| an outline | Surface, Pill, Divider |
A Stack places its islands against the screen’s edge; each Island is one surface, whose rows Cursor moves over.
| Component | Use |
|---|---|
Label | all text, coloured by tone: normal, dim, primary, warning or alert; bold when strong, the one to find first (a heading, the clock, the item in use) |
Tone | the colour of each tone, dim being the normal colour at reduced alpha; a panel’s background; a tone washed behind something (a highlight, a track) |
Metrics | the font’s character width (cell) and line height (line), and a row’s with its icon (row), for sizes given in characters, lines or rows; the kit’s fixed sizes (a row’s padding, the gap between columns, a meter, the pop-up’s level) |
Icon | a glyph or an image in the same square; recolour draws an image as drawn, in greys, or as its shape in its tone’s colour (tint, a symbolic icon only; any other goes grey); busy puts a wait in its place, the braille dots terminals turn at their own tempo, still when animations are off |
StatusLine | icon, an optional title that never changes, text (bold when strong), and a detail on the right, glyphs before it drawn as icons (a mode, a submenu), a swatch dot after it, then an optional meter; with a title the text is a value, right-aligned unless packed beside the title, and valueTone colours what reports; its text names a state (off, muted) only when there is no value |
Words | the words the surfaces share, one per meaning: the one ellipsis, a conversation’s phases as its answer and prompt say them, what a key does in a legend |
KeyHint | a key in its gutter, never narrower than the key |
KeyLegend | keys a level takes beyond its rows, on one line on its bar after a content level’s actions: only those the state changes, each while it applies (the fixed ones are ?’s, unless a legend names them); each key as KeyHint shows it, then what it does in a lowercase word or two (today, terminal...) |
KeyList | keys and what each does, a row each |
Cursor | the row the arrows are on, by id, over rows laid out row-major in columns: ↓↑ a row and ←→ one, only those free names (what its owner leaves free), the first from from (the item in use), else onto the first row or the last, stopping at the edges; key moves it, atEdge says whether ↑↓ would leave its rows, point puts it on a row or none, and its owner says what RET runs; pure, in cursor.js |
Meter | a thin level bar |
Markdown | an agent’s answer rendered from its Markdown (markdown) by Markup a piece at a time, so a stream redraws only its last; a selection, within a piece, is copied and reported (selected), and kept shows it again as its piece is rebuilt |
Markup | what the kit reads in an agent’s Markdown, in one place: its plain lines (compact), its pieces (split, whole blocks gathered to a size), each one’s html for Markdown, and whether it hasTable. The html is rich text of the kit’s own making: the text escaped, an image or a link shown by its text, so nothing is fetched and no HTML runs. A table’s header is bold over one divider, code sits on a faint wash, a quote dim behind a rule, a heading bold at the body size (as the calendar’s month), prose at theme.lineHeight |
TextArea | text typed in, plain and wrapped, with a dim placeholder while empty, growing to maxLines, then scrolling to the cursor; its keys reach keyPressed first |
Prompt | a line of text to send: a column as wide as its key’s name, holding the key dim while it waits (TAB for a level’s input), else a glyph on the column’s left edge, and a spinner in their place while busy (what it sends to takes no text); then a TextArea. Return sends its text (sent), in the background with Ctrl+Shift, unless sends is off (a filter). A click while waiting reaches tapped. keys is a legend on its right (picked), detail a dim value after it |
Exchange | one turn of a conversation: the question a Bubble on the right, the answer (text, Markdown) plain on the left, drawn by its phase (Phase) and kind. Working shows a spinner and activity until the answer streams in, then a spinner where its copy button goes until done. Blocked shows a permission in warning, in plain text: its title is the agent’s command. Error is in alert, the question faded; idle, once stopped. steps are dim lines over the answer (an approval you gave). With lines it is compact, cut there, overflows saying what it cannot hold; else it all shows as Markdown, with a copy button (copyable). kept and selected pass its answer’s selection through |
Bubble | a message in a conversation, yours (mine) on the right in the theme’s bubble colour with bubbleText, the other’s plain on the left, never glyphs, its text on the keys’ edge, as wide as its content up to maximumWidth, or all of it when full (text cut at a line count cannot size it); faded for one that did not go through |
Thread | a conversation’s turns, its delegate each, built only where they show and laid out from the newest up, so it rests at its end; what scrolled away above fades out; page scrolls most of a view up or down; empty, it says emptyText in emptyTone |
Phase | work as Rex’s Program Status Protocol names it, one vocabulary for every surface: idle, working, blocked on you, done, error; of reads one a source gave, tone draws it (blocked warns, error alerts, done is lit) |
Divider | a line between two parts of one content (the calendar’s month and agenda), in the theme’s border; never between content and its actions |
ListItem | a row with hover, click, right click and wheel, highlighted while current (a selected day, an event in focus); dims itself when disabled |
WheelSteps | a pointer area that turns the wheel into one step per notch |
Surface, Pill | a panel outlined in the theme’s border and borderWidth; a capsule outlined the same, or in its tone for a state (recording) |
PlacedRegion | a blur or input region over an item at a place its holder gives, for an item that what holds it moves (a part of a split island); empty while the item hides |
Stack | a surface the keyboard opens, the menu or a plugin’s: its islands listed top to bottom, the last against the screen’s bottom edge, centred and as wide as width lets the screen (room); the island marked cut gives up what the screen cannot hold past the others, and an empty one holds its place unless none farther from the edge shows (pure, in places.js). One open at a time, dismissed by a click anywhere else; the island focus names has the keys, and keys it leaves reach keyPressed |
Island | one surface of a Stack, empty when its content has nothing to show: its content, as wide as its width (else the Stack’s), padding above and below, the theme’s padding plus inset on its sides (a row’s, so key columns line up), at least minimumHeight tall, and while holdKey stays set the tallest it has been, its content against the screen’s edge when shorter; when split, a surface behind each item its content lists in parts instead (a bar as islands); a click on it reaches clicked, a right click secondaryClicked |
Panels | the surfaces the keyboard opens as one stack of their owners: the top one shows, open covers or brings one back, back shows what it covered, close hides them all; and the top level’s right slot a plugin’s panel’s bar repeats |
Tip | names what the pointer rests on (an icon alone), or shows text cut to fit whole, above it, after a moment |
Swatch | a dot, or a bar when stretched, in a colour that is data (a calendar’s), dimmed by its tone like the rest |
OverlayWindow, DismissArea | a popup above everything, edgeMargin from its screen’s edge (theme.edgeMargin, no more than a quarter of the screen); the click-outside catcher under it, one per screen |
CornerPill | a pill in the top-right corner of every screen while shown, fading in and out, stacked under the pills already showing; hovered and clicked for its pointer |
CornerPills | the corner pills on screen, in the order they showed, which is the order they stack in, each as tall as it draws |
Transient | shown for a moment on show(), held while held, ignoring startup’s replayed state until armed |
Fade | fades a surface in and out over theme.animationDuration; loaded holds a LazyLoader until it has faded out; the menu appears and closes at once, since its background blur cannot fade with it and a fade-out would hold the keyboard |
MenuKeys | key names as entries declare them (Ctrl+Left), their hints, the gutter a key column takes (gutter, a character past a letter), and keys for an app’s own menu, keeping letters from the labels its app supplies |
Glyphs | the icon set, Material Design from Nerd Fonts, each an escape ("\u{F05A9}") named after its entry; glyphs in the config overrides any by that name (wifi, audioDevices, batteryLevels) |
Clock | a date or a time said in clock.locale: time, day, when, recent, a day’s heading and a month’s monthHeading in sentence case, stale past minutes, a day moved by years, months and days, the files’ dayKey and minuteKey and their parse; pure, in clock.js, from a given now |
alert is only for what needs attention: critical battery, recording, a failed sync or reply; a state you chose (keep awake, do-not-disturb) is primary. Tone goes to what reports, never to a label beside it. Outlines stay calm in border; tint is for state. Wrapped prose is spaced at theme.lineHeight; rows keep their own padding.
Reference
Settings
Every key of config.json (programs.quick-key.settings with Nix), as the shell declares it. A command given values gets them as $1, $2.
theme
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
theme.name | string | A theme by file name: yours in $XDG_CONFIG_HOME/quick-key/themes/, else a preset in themes/. | ||
theme.background, theme.foreground, theme.primary, theme.alert, theme.warning | string | #rgb, #rrggbb or #aarrggbb | Colours over the theme’s own. | |
theme.border | string | #rgb, #rrggbb or #aarrggbb | Outlines and dividers; unset, the foreground at disabledOpacity, so tint is left to state. | |
theme.bubble, theme.bubbleText | string | #rgb, #rrggbb or #aarrggbb | Your messages in a conversation, and their text; unset, the foreground at 0.15, and the foreground. | |
theme.surfaceOpacity | number | 0.92 | 0 to 1 | A panel’s background opacity. |
theme.highlightOpacity | number | 0.25 | 0 to 1 | A highlight’s opacity (the row under the pointer, a meter’s track). |
theme.dimOpacity | number | 0.8 | 0.2 to 1 | Secondary text’s opacity (values, legends, dim glyphs): 0.8 keeps it near WCAG AA’s 4.5:1 on a dark theme. |
theme.disabledOpacity | number | 0.5 | 0.2 to 1 | The opacity a row that cannot run now fades to. |
theme.animationDuration | integer | 100 | 0 to 2000 | Milliseconds a fade or colour change takes; 0 for none. |
theme.monospaceFont | string | "monospace" | The one font, by family: monospace, since sizes are counted in its characters. | |
theme.fontSize | integer | 11 | 6 to 32 | The font’s size, in points. |
theme.lineHeight | number | 1.3 | 0.1 to 4 | Wrapped prose (an answer) at this multiple of a line; rows keep their own padding. |
theme.radius | integer | 10 | 0 to 100 | Corner radius of panels and cards, in pixels. |
theme.itemRadius | integer | 6 | 0 to 100 | Corner radius of rows, highlights and tips, in pixels. |
theme.iconSize | integer | 24 | 4 to 128 | An icon’s size, in pixels; unset, it follows the font, 24 at 11 points. |
theme.appIcons | string | "colour" | "colour", "grey", "tint" | Apps’ own icons (the tray’s): “colour” as drawn, “grey” like the glyphs beside them, or “tint”, a symbolic icon in the text’s colour so a white one reads on a light theme, any other in greys. |
theme.besideBars | boolean | false | The menu, pop-ups and cards keep clear of space another bar reserves, instead of covering it. | |
theme.borderWidth | integer | 1 | 0 to 20 | Outlines and dividers, in device pixels. |
theme.spacing | integer | 8 | 0 to 50 | The gap between items, in pixels. |
theme.padding | integer | 14 | 0 to 50 | The space inside a panel’s or a card’s edge, in pixels. |
theme.edgeMargin | integer | 35 | 0 to 400 | The distance from the screen’s edge to the menu, its panels, pop-ups and cards, in pixels. |
The presets theme.name takes, beside your own:
| Preset | background | foreground | primary | alert | warning |
|---|---|---|---|---|---|
catppuccin-latte | #eff1f5 | #4c4f69 | #1e66f5 | #d20f39 | #9a6200 |
catppuccin-mocha | #1e1e2e | #cdd6f4 | #89b4fa | #f38ba8 | #f9e2af |
gruvbox-dark | #282828 | #ebdbb2 | #83a598 | #fb4934 | #fabd2f |
nord | #2e3440 | #d8dee9 | #88c0d0 | #bf616a | #ebcb8b |
tokyo-night | #1a1b26 | #c0caf5 | #7aa2f7 | #f7768e | #e0af68 |
menu
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
menu.entries | any | The top level’s entries; unset (null), the starter menu in menu.json, which setting entries replaces whole. | ||
menu.bar.left, menu.bar.center, menu.bar.right | any | The top level’s bar, like waybar’s modules-left, -center and -right: entries, and statuses and plugins by name; a slot unset (null) is the starter’s. | ||
menu.width | integer | 960 | 200 or more | A level’s width in pixels, unless its entry sets width; unset, it follows the font, 960 at 11 points, never past the screen. |
menu.columns | integer | 2 | 1 to 9 | The columns a level lays its actions out in, unless its entry sets columns. |
menu.input | any | The top level’s input, as an entry’s input: the catch-all line to a plugin or a command. | ||
menu.layout | list | ["input","body","bar"] | The top level’s islands, top to bottom: input, body (once), bar, and { level = "t"; } pinning the top-level entry on t on an island of its own. | |
menu.height | any | The rows a level’s body holds at least, unless its entry sets height or shows a view: unset (null), it fits what it shows. | ||
menu.splitBar | boolean | false | Draws the bar’s actions and slots apart, each on an island of its own, rather than on one bar. | |
menu.keysHint | boolean | true | Shows the key listing the rest on the bars that have one (? keys, Ask’s C-? keys); off, the key still acts. |
clock
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
clock.format | string | The clock status’s format: strftime as waybar takes it, plus %o for the English ordinal; unset, the weekday, day and month (Tuesday 24 November) and the locale’s time. | ||
clock.locale | string | The locale every date and time is said in (en_GB): its names, and 24 or 12 hours; unset, the system’s (LC_TIME). | ||
clock.firstDayOfWeek | integer | -1 | -1 to 6 | The calendar’s first day of the week, 0 for Sunday to 6 for Saturday; unset (-1), the locale’s. |
calendar
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
calendar.file | string | "$XDG_STATE_HOME/quick-key/events.json" | The events file the month shows, by default $XDG_STATE_HOME/quick-key/events.json; until it exists, the month alone. | |
calendar.remind | string | in the source | Given an event’s title and when (14:00 · Rua Augusta 120), reminds of it; empty, no reminders. | |
calendar.remindBefore | integer | 10 | 0 or more | Minutes before a timed event starts that remind runs. |
calendar.staleAfter | integer | 120 | 0 or more | Minutes after the last sync before it shows in warning. |
popups
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
popups.timeout | integer | 1500 | 100 to 60000 | Milliseconds a pop-up stays. |
popups.show | list | ["sink","source","brightness","keyboardLayout","keepAwake"] | The statuses and plugins whose changes pop up, by name; battery’s as it is plugged in or out, bluetooth’s as it turns on or off or a device connects or leaves. |
audio
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
audio.step | integer | 5 | 1 or more | Percent a volume key or a wheel notch moves the volume. |
audio.max | integer | 100 | 1 to 150 | The most a volume key or the wheel raises it to, in percent. |
bluetooth
| Setting | Type | Default | Description |
|---|---|---|---|
bluetooth.unblock | string | "rfkill unblock bluetooth" | Unblocks an adapter rfkill turned off, so the Bluetooth action can power it on. |
brightness
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
brightness.backlight | string | in the source | Prints the path of a file holding the backlight’s value, a tab, and its maximum; by default the first backlight. | |
brightness.step | integer | 5 | 1 or more | Percent a key or a wheel notch moves the backlight. |
brightness.set | string | in the source | Given the backlight’s name and a value, sets it; by default through logind, which lets the active session do so without root. | |
brightness.panel | string | The output the backlight lights, by connector name or, on niri, by make, model and serial; unset, the built-in one (eDP, LVDS or DSI). |
keyboardLayout
| Setting | Type | Default | Description |
|---|---|---|---|
keyboardLayout.labels | list | [] | A short label per layout, in the compositor’s order ([“US”, “PT”]); unset, the first two letters of its name. |
daemons
| Setting | Type | Default | Description |
|---|---|---|---|
daemons.list | string | "busctl --system list --no-legend --no-pager" | Prints the names on the system bus, running or started on demand, the first on each line: what a built-in that needs a daemon looks for (power profiles). |
battery
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
battery.low | integer | 20 | 0 or more | Percent of charge at which, on battery, the battery status warns and warn runs. |
battery.critical | integer | 5 | 0 or more | Percent of charge at which, on battery, the battery status alerts and warn runs again. |
battery.warn | string | "notify-send --app-name=Battery --icon=battery-caution" | Given a title and a line (Battery low, 18% left), as the charge falls to low or critical, once each; empty, no warnings. |
music
| Setting | Type | Description |
|---|---|---|
music.player | string | The MPRIS identity of the player the music status follows; unset, the one playing, else the last that played, else any. |
music.titleMatch | string | A regular expression over the title: where it matches, its first group is the song and its second the artist; unset, titles as given. |
plugins
Optional parts by name, each its settings and type: see plugins.md.
glyphs
Any icon by its name in ui/Glyphs.qml (wifi, audioDevices, batteryLevels), over its default: a glyph, a list of them, or a map.
| Glyph | Takes | Default (Nerd Fonts) | Description |
|---|---|---|---|
microphone | glyph | md-microphone | |
microphoneOff | glyph | md-microphone_off | |
music | glyph | md-music | |
musicPaused | glyph | md-pause | |
musicOff | glyph | md-music_off | |
shuffle | glyph | md-shuffle_variant | |
repeat | glyph | md-repeat | |
wifi | glyph | md-wifi | |
ethernet | glyph | md-ethernet | |
disconnected | glyph | md-wifi_off | |
volume | glyph | md-volume_high | |
volumeOff | glyph | md-volume_off | |
keyboard | glyph | md-keyboard | |
bluetooth | glyph | md-bluetooth | |
bluetoothConnected | glyph | md-bluetooth_connect | |
bluetoothOff | glyph | md-bluetooth_off | |
playPause | glyph | md-play_pause | |
track | glyph | md-skip_next | |
keepAwake | glyph | md-coffee | |
tray | glyph | md-apps | |
notifications | glyph | md-bell | |
notificationsPaused | glyph | md-bell_off | |
window | glyph | md-application_outline | |
record | glyph | md-record_rec | |
calendar | glyph | md-calendar | |
checkbox | glyph | md-checkbox_blank_outline | |
checkboxChecked | glyph | md-checkbox_marked | |
tasks | glyph | md-format_list_checks | |
late | glyph | md-alarm | |
brightnessLevels | list of glyphs | md-brightness_5, _6, _7 | |
check | glyph | md-check | |
search | glyph | md-magnify | |
sorts | map of glyphs | due md-sort_calendar_ascending, priority md-sort_numeric_ascending, title md-sort_alphabetical_ascending, list md-format_list_group | The tasks’ order and what their done ones show, each by its value. |
completed | map of glyphs | hidden md-eye_off_outline, shown md-eye_outline, only md-check_all | |
priorities | map of glyphs | high md-chevron_double_up, low md-chevron_double_down | A task’s priority, as iCalendar groups its ranks. |
submenu | glyph | md-chevron_right | |
prompt | glyph | md-chevron_right | What marks a prompt: an input with the keys, and what was asked in Ask. |
conversation | glyph | md-chat_outline | A past conversation, as Ask lists them. |
copy | glyph | fa-copy | |
failed | glyph | md-alert_circle_outline | |
powerProfiles | map of glyphs | power-saver md-leaf, balanced md-scale_balance, performance md-speedometer | A power profile by its name. |
audioDevices | map of glyphs | headphones md-headphones, headset md-headset, internal md-monitor_speaker, external md-speaker, microphone md-microphone | |
batteryLevels | list of glyphs | md-battery_outline, md-battery_10 to _90, md-battery | |
batteryChargingLevels | list of glyphs | md-battery_charging_outline, md-battery_charging_10 to _100 | |
wifiLevels | list of glyphs | md-wifi_strength_outline, md-wifi_strength_1 to _4 | |
wifiLimitedLevels | list of glyphs | md-wifi_strength_alert_outline, md-wifi_strength_1_alert to _4_alert |
Renamed and removed
A config still setting an old key fails its check, saying what to write instead, or that it is gone.
| Old key | Instead |
|---|---|
theme.monochromeTray | now theme.appIcons, true as “grey” |
menu.edge | removed: the menu always sits at the bottom |
menu.align | removed: the menu is always centred |
theme.titleScale | removed: titles take the font’s size |
theme.motion | removed: pop-ups always fade |
glyphs.link | removed: an answer’s links stay in its text |
glyphs.close | removed with the notifications plugin |
glyphs.urgent | removed with the notifications plugin |
menu.inputSide | now menu.layout: [“body”, “input”, “bar”] puts the input between the body and the bar |
popups.position | removed: the pop-up always sits at the right edge |
menu.margin | removed: every surface sits theme.edgeMargin from the edge |
popups.margin | removed: every surface sits theme.edgeMargin from the edge |
theme.osdLength | removed: a fixed size of the kit |
theme.osdIconSize | removed: a fixed size of the kit |
theme.meterThickness | removed: a fixed size of the kit |
theme.meterLength | removed: a fixed size of the kit |
theme.itemPaddingX | removed: a fixed size of the kit |
theme.itemPaddingY | removed: a fixed size of the kit |
theme.listSpacing | removed: a fixed size of the kit |
menu.header | now menu.bar |
menu.islands | now menu.splitBar |
Menu entries
What an entry in menu.entries, a submenu or a bar takes, and the built-in names it can use (Menu).
Fields
| Field | Takes | Allowed | On | Description |
|---|---|---|---|---|
key | string or list | any | Its key, or a pair of keys sharing a row ([“Down”, “Up”]); a bar entry needs none. | |
desc | string | any | Its label, which never changes. | |
cmd | string or list | any | A shell command, which closes the menu; a list pairs one with each key. | |
action | string | any | A built-in action, or one of the plugin its level lists. | |
icon | string | any | Its glyph; an action brings its own. | |
width | number | 1 or more | any | Its level’s width in pixels, over menu.width. |
height | integer | 1 or more | with submenu or list, without view or limit | The rows its level’s body holds at least, over menu.height: unset, it fits what it shows. |
submenu | list | any | Its level’s entries. | |
keepOpen | boolean | with cmd or action | Keeps the menu open once its cmd runs, or its action at the end of a key path that opened the menu. | |
activeWhen | string: a state or a plugin | any | Lights it while the state it names is on. | |
columns | integer | 1 to 9 | a level (submenu, list or view) | The columns its level lays its actions out in, over menu.columns. |
list | string: a list or a plugin | any | Its level lists these items on digits. | |
pins | list | with list | Items kept on their digits, in order, dim while absent: each { match, label, icon }, a glob on the item’s id, what it is called, and an optional glyph. | |
view | string | "calendar" | without list | Its level shows this view in place of a menu. |
status | string: a status or a plugin | any | Live state on the right of its row. | |
format | string | with status | Its status’s fields to show (“{song}”), what follows a | kept whole on the right. | |
bar | map | a level (submenu, list or view) | Its level’s bar: left, center and right, as menu.bar. | |
shortcut | string | a bar | Its compositor key (Mod+N), only a label: shown while Super is held. | |
limit | number | 1 to 9 | a bar or a pinned level, with list | The most items of its list a bar or its pinned level shows; past it, the rest on 0. |
input | map | a level (submenu, list or view) | A line of text over its level, given to a command or a plugin: { desc, cmd or plugin, context, after }. | |
layout | list | a level (submenu, list or view) | Its level’s islands, as menu.layout, until ESC; unset, it opens in the current layout’s body. | |
legend | list | a level (submenu, list or view) | Keys of its level’s ? list to show in its bar too, after the bar’s own: [“Ctrl+Up”]. |
Statuses
| Status | Fields | Format | Description |
|---|---|---|---|
sink | {device}, {volume} | {device}|{volume} | The default audio output. |
source | {device}, {volume} | {device}|{volume} | The default audio input, the microphone. |
music | {song}, {title}, {artist}, {state} | Its glyph says whether it plays; with nothing playing it says so, which reads as state rather than something missing. | |
network | {name}, {internet}, {wifi} | {name}|{internet} {wifi} | |
bluetooth | {device}, {state}, {battery} | {device}|{state}{battery} | |
brightness | {level} | |{level} | The backlight’s level; nothing while the output it lights is off. |
calendar | {title}, {when}, {more}, {updated} | |{when} | When the next event in calendar.file is; more is how many more start today (+2), updated how old the events are. |
clock | {date} | {date} | |
battery | {level} | {level} | |
keyboardLayout | {layout} | {layout} | The layout’s label; with one layout nothing, as it can never switch. |
powerProfile | {profile} | |{profile} | Where its daemon is (Power.profilesPresent); else nothing, so the row dims and a bar hides it. |
keepAwake |
Actions
| Action | Keys | Lit by | Description |
|---|---|---|---|
sinkVolume | a pair | ||
sinkMute | sinkMuted | ||
sourceVolume | a pair | ||
brightness | a pair | ||
sourceMute | sourceMuted | ||
streamVolume | a pair | ||
streamMute | streamMuted | ||
wifi | wifi | ||
bluetooth | bluetooth | ||
playPause | Plays or pauses the player the music status shows. | ||
track | a pair | The previous track, then the next. | |
repeat | repeat | ||
shuffle | shuffle | ||
keepAwake | keepAwake | ||
powerProfile | Steps to the next power profile, the one in use beside it. | ||
keyboardLayout | Switches to the next keyboard layout; with one, it dims. |
Lists
| List | Description |
|---|---|
tray | |
wifi | |
bluetooth | |
powerProfiles | The power profiles its daemon offers, the one in use lit; a digit switches to one. |
sinks | |
sources | |
streams | What apps play: a digit picks the one the stream actions change. |
States
wifi, bluetooth, repeat, shuffle, sinkMuted, sourceMuted, streamMuted, keepAwake
Views
calendar
Plugin settings
Every plugin takes these under plugins.<name>, beside its type, then its own (Plugins).
Every plugin
| Setting | Type | Default | Description |
|---|---|---|---|
watch, read, file | string | Its one source of state, at most one set: a command printing a line per change, one run as the menu opens, or a file read on every change, relative to $XDG_RUNTIME_DIR (plugins.md#sources). | |
show | map | {} | The look of each value the source gives, by value: any state line field (glyph, text, detail, active, tone, phase, a plugin’s own such as stage), the line’s own winning; a value without one shows as text. |
items | list | [] | Its items when they never change, each { id, label, icon, detail }; the source’s value names the one in use. |
shortcut | string | Its compositor key (Mod+N), only a label: shown while Super is held; the binding is the compositor’s. | |
title | string | Its name in tips, prompts and notifications; unset, its name under plugins. | |
glyph | string | Its glyph when its state names none. | |
activate | string | What a click on it in a bar, or <name> activate over IPC, runs. | |
legend | list | [] | Keys its panel lists on ? to show in its bar too, after the bar’s own: [“Page_Up”, “Page_Down”]. |
ask
| Setting | Type | Default | Description |
|---|---|---|---|
glyph | string | glyph conversation | Its glyph in a bar, so a turn waiting on you shows there too. |
ask | string | Required: the agent, a command speaking ACP on its stdio, kept running between turns. | |
cwd | string | Where its sessions work, on the agent’s machine; unset, $HOME. | |
idle | integer | 10 | Minutes without a turn before the agent is stopped; the next turn starts it again. |
toolMatch, toolRun | string | A tool name pattern (a regular expression): toolRun runs once a turn that used a matching tool ends. | |
notify | string | in the source | Given a title and a text, tells of an answer while the panel is hidden, each replacing the last by its tag; printing default (a click) shows the panel. |
open | string | Given the session, opens it in a terminal. | |
promptGlyph | string | The prompt’s glyph, its own (the agent’s face) over the one every input shares (glyphs.prompt). | |
placeholder | string | "Ask {title}..." | What the empty prompt says, {title} for the title. |
lines | integer | 14 | The conversation’s height, in lines, declared so the panel holds still. |
command
| Setting | Type | Description |
|---|---|---|
select | string | Runs given the chosen item’s id. |
run | string | Runs given an item’s id and the key of the action chosen from its own menu. |
dictation
| Setting | Type | Description |
|---|---|---|
stop | string | Stops dictating. |
dunst
| Setting | Type | Default | Description |
|---|---|---|---|
watch | string | in the source | Prints whether dunst is paused, then again on every change dunst signals. |
activate | string | "dunstctl set-paused toggle" | Pauses or resumes dunst’s notifications. |
show | map | in the source | A struck bell, lit, while paused; a bell otherwise. |
mako
| Setting | Type | Default | Description |
|---|---|---|---|
watch | string | in the source | Prints whether mako’s do-not-disturb mode is on, then again on every change of mode mako signals. |
activate | string | "makoctl mode -t do-not-disturb" | Turns the do-not-disturb mode on or off. |
show | map | in the source | A struck bell, lit, while the mode is on; a bell otherwise. |
niriMinimap
| Setting | Type | Default | Description |
|---|---|---|---|
height | integer | 30 | A workspace’s height on the map, in pixels. |
maxWidth | integer | 180 | The widest a workspace gets on the map, in pixels; a wider one shrinks to fit. |
opacity | number | 0.7 | A window tile’s background opacity, 0 to 1. |
recording
| Setting | Type | Description |
|---|---|---|
stop | string | Stops the recording. |
tasks
| Setting | Type | Default | Allowed | Description |
|---|---|---|---|---|
glyph | string | glyph tasks | Its glyph, so its row has an icon without one of its own. | |
done | string | Given a task’s id and title, ticks it off and writes the file again. | ||
reopen | string | Given a task’s id and title, unticks it and writes the file again. | ||
add | string | Given a title, adds a task to the first list and writes the file again. | ||
sync | string | Syncs, as the menu opens on a file syncAfter minutes old, and after a tick. | ||
syncAfter | integer | 5 | Minutes old the file may be before opening the menu syncs it; syncing on every opening would keep the calendar syncing. | |
staleAfter | integer | 120 | Minutes after which the last sync shows in warning. | |
sort | string | "due" | "due", "priority", "title", "list" | The order to start in; the sort action steps through them. |
completed | string | "hidden" | "hidden", "shown", "only" | What the done ones show at the start; the completed action steps through them. |
remind | string | Given a title and a time, as a timed task falls due; unset, no reminders. |
Module options
programs.quick-key.enable
Whether to enable quick-key, a keyboard-driven Quickshell menu with live status.
Type: boolean
Default:
false
Example:
true
programs.quick-key.package
Shell package, its QML under share/quick-key
Type: package
Default:
quick-key.packages.${pkgs.stdenv.hostPlatform.system}.quick-key
programs.quick-key.calendarSync.enable
Whether to enable syncing calendars into the events the month shows.
Type: boolean
Default:
false
Example:
true
programs.quick-key.calendarSync.package
calendar-sync package
Type: package
Default:
quick-key.packages.${pkgs.stdenv.hostPlatform.system}.quick-key-calendar-sync
programs.quick-key.calendarSync.calendars
Path of the calendar list (YAML), edited by hand since its URLs are secret; it starts as a commented sample, and saving it syncs
Type: string
Default:
"${config.xdg.configHome}/quick-key/calendars.yaml"
programs.quick-key.calendarSync.eventsFile
Events written for the shell, in a folder of calendar-sync’s own (made 0700, its contents replaced) with vdirsyncer’s and khal’s files
Type: string
Default:
"${config.xdg.stateHome}/quick-key/events.json"
programs.quick-key.calendarSync.exec.add
Command that adds a task to the first list, given its title, for the tasks plugin
Type: string (read only)
Default:
calendar-sync’s add, given a task’s title
programs.quick-key.calendarSync.exec.done
Command that ticks a task off, given its id and title, for the tasks plugin
Type: string (read only)
Default:
calendar-sync’s done, given a task’s id and title
programs.quick-key.calendarSync.exec.reopen
Command that unticks a task, given its id and title, for the tasks plugin
Type: string (read only)
Default:
calendar-sync’s reopen, given a task’s id and title
programs.quick-key.calendarSync.exec.sync
Command that syncs now, for a menu entry
Type: string (read only)
Default:
"${lib.getExe' pkgs.systemd "systemctl"} --user start --no-block quick-key-calendar-sync.service"
programs.quick-key.calendarSync.exec.syncAndWait
Command that syncs and returns once done, for a script that reads the files after
Type: string (read only)
Default:
"${lib.getExe' pkgs.systemd "systemctl"} --user start quick-key-calendar-sync.service"
programs.quick-key.calendarSync.interval
How often to sync, as a systemd OnCalendar expression
Type: string
Default:
"*:0/30"
programs.quick-key.calendarSync.tasksFile
Tasks written for the tasks plugin, from the calendars with tasks: true
Type: string (read only)
Default:
"${dirOf config.programs.quick-key.calendarSync.eventsFile}/tasks.json"
programs.quick-key.exec.ipc
Prefix for the shell’s IPC calls; append the target and function, e.g. menu toggle
Type: string
Default:
"${lib.getExe config.programs.quickshell.package} -c quick-key ipc call"
programs.quick-key.extraPackages
Packages first on the shell’s PATH, for what commands and plugins call by name; one here wins over a standard tool’s
Type: list of package
Default:
[ ]
Example:
[ config.services.dunst.package ]
programs.quick-key.settings
Written to $XDG_CONFIG_HOME/quick-key/config.json, which the shell checks as the configuration builds
Type: JSON value
Default:
{ }
Example:
{ theme.name = "nord"; clock.format = "%H:%M"; }
programs.quick-key.themes
Colour themes, written to $XDG_CONFIG_HOME/quick-key/themes/ and picked by settings.theme.name
Type: attribute set of (submodule)
Default:
{ }
programs.quick-key.themes.<name>.alert
Colour of what needs attention
Type: string
programs.quick-key.themes.<name>.background
Background colour
Type: string
programs.quick-key.themes.<name>.border
Colour of outlines and dividers; unset, the foreground at theme.disabledOpacity
Type: null or string
Default:
null
programs.quick-key.themes.<name>.bubble
Colour of your messages in a conversation; unset, a faint foreground
Type: null or string
Default:
null
programs.quick-key.themes.<name>.bubbleText
Colour of your messages’ text; unset, the text colour
Type: null or string
Default:
null
programs.quick-key.themes.<name>.foreground
Text colour
Type: string
programs.quick-key.themes.<name>.primary
Colour of what is on or in use
Type: string
programs.quick-key.themes.<name>.warning
Colour of what may soon need attention
Type: string