Keyboard-driven menus for the GNOME desktop on an NVIDIA DGX Spark (Ubuntu,
aarch64), modelled on Omarchy's SUPER+K (keybindings) and SUPER+SPACE
(launcher) menus. One small Python / GTK 4 / libadwaita app with two faces:
| Key | Command | What it opens |
|---|---|---|
SUPER+K |
spark-menu keys |
Keybindings window: every live keyboard shortcut on the machine, grouped and searchable, and an editor to change them |
SUPER+SPACE |
spark-menu launch |
Launcher: a full-screen, dimmed overlay to search and start apps and system actions |
| — | spark-menu keys --print |
The same shortcut list as plain text in the terminal |
Nothing runs at login and nothing stays resident: each key press starts the app, and it exits when you close it.
- Install
- The launcher (SUPER+SPACE)
- The keybindings window (SUPER+K)
- Editing shortcuts
- Locks: what you can't edit, and why
- Clashes
- Terminal cheat sheet
- How it fits with spark-tiles and Forge
- What install.sh changes
- Uninstall
- Code layout
- Tests
- Adding a launcher item
- Troubleshooting
Requirements: GNOME Shell (tested on Ubuntu's GNOME on the DGX Spark), Python 3, GTK 4 and libadwaita bindings.
sudo apt-get install -y python3-gi gir1.2-gtk-4.0 gir1.2-adw-1 python3-pytest
git clone <this repo> ~/projects/spark-menu
bash ~/projects/spark-menu/install.shinstall.sh is safe to run again; every step checks before it changes anything.
If Spark Tiles is ON when you install,
install.shwarns you: tiling's saved snapshot predates the new shortcuts, sospark-tiles offwould remove them. Runspark-tiles off, theninstall.shagain.
~/.local/bin/spark-menu is a symlink into the repo, so edits to the code
take effect on the next key press with no reinstall.
A centred menu box over a dimmed, full-screen backdrop. The top level is:
| Item | What it does | When it's shown |
|---|---|---|
| Apps › | Every app GNOME's app grid shows, A→Z, with icons | always |
Keybindings SUPER+K |
Opens the keybindings window | always |
JBL speaker: connect / disconnect SUPER+B |
Runs bluetooth toggle jbl |
when a bluetooth command exists (PATH or ~/.local/bin) |
Tiling › ON/OFF |
Turn tiling on / Turn tiling off (runs spark-tiles on/off) and Tiling keys |
when spark-tiles and the Forge extension are both installed |
| System › | Dock toggle, Lock, Suspend, Log out, Reboot, Shut down | always |
| Item | Command | Asks first? |
|---|---|---|
Hide dock ON / Show dock OFF |
gnome-extensions disable/enable ubuntu-dock@ubuntu.com |
no |
| Lock | loginctl lock-session |
no |
| Suspend | systemctl suspend |
yes |
| Log out | gnome-session-quit --logout --no-prompt |
yes |
| Reboot | systemctl reboot |
yes |
| Shut down | systemctl poweroff |
yes |
The dock item reflects the dock's state when the launcher opens: it says
Hide dock (tag ON) while the Ubuntu Dock is enabled and Show dock (tag
OFF) while it's disabled. It only appears if the Ubuntu Dock extension is
installed. Disabling the extension persists across logins and reboots, and the
dock's own SUPER+1..9 app hotkeys go away with it.
The Suspend and Shut down prompts remind you the Spark is reached over RustDesk: once it's off or asleep, someone may have to press its power button.
| Key | Action |
|---|---|
| type | Search every app and action across all levels (no need to open a group first) |
↑ / ↓ |
Move the selection |
Enter |
Run the selection, or open a group |
Backspace on an empty search |
Go back up a level |
Esc |
Close (or cancel a confirm prompt) |
| Click outside the box | Close |
SUPER+SPACE again |
Close |
| Switching to another window | Close |
The breadcrumb above the search box shows where you are (e.g. System).
Every word you type must match. Results are ranked:
- label starts with the word,
- a word in the label starts with it,
- the label contains it,
- a keyword matches (e.g.
sleep→ Suspend,restart→ Reboot,bluetooth→ JBL speaker,dock/taskbar→ the dock toggle; apps match their generic name and desktop-file keywords, sobrowserfinds Firefox).
While searching, the right-hand column shows where each result lives (App,
System, Tiling, …) instead of its tag.
Risky actions replace the list with a question: Enter = yes, Esc = no. For a quarter of a second after the prompt appears, Enter is ignored. Enter also has to be released before it counts again whenever something new appears (a prompt, a deeper level), so a held key, X auto-repeat or a laggy key-up over RustDesk never fires twice and never confirms by accident.
Apps start through GNOME's normal launch path, so they behave as if started from the dock. Commands run in their own session, so closing the launcher never kills them. Toggles (tiling, dock, speaker) are waited for: if one exits non-zero you get a desktop notification with the first line of its error. A missing command shows as "…: not installed".
A window titled Spark Menu — Keybindings that lists every assigned shortcut on the machine, read live from GNOME's settings each time it opens.
| Source | GSettings schema |
|---|---|
| GNOME window manager | org.gnome.desktop.wm.keybindings |
| GNOME Shell | org.gnome.shell.keybindings |
| Mutter | org.gnome.mutter.keybindings, org.gnome.mutter.wayland.keybindings |
| Media / system keys | org.gnome.settings-daemon.plugins.media-keys |
| Your custom shortcuts | …media-keys.custom-keybinding:<path> |
| Forge tiling | org.gnome.shell.extensions.forge.keybindings (from Forge's own schema dir) |
| Ubuntu Dock hotkeys | org.gnome.shell.extensions.dash-to-dock app-hotkey-N (only while the dock's hot-keys is on; the duplicate Shell switch-to-application-N rows are hidden then) |
Missing sources are noted at the bottom instead of failing (e.g. "Forge not installed — tiling shortcuts not shown").
Rows are grouped, in this order: Tiling, Windows, Workspaces, Apps, System,
Custom, Other. Raw setting names are turned into plain English
(switch-to-workspace-3 → Go to workspace 3, volume-up-quiet → Volume up
(quiet), app-hotkey-2 → Open dock app 2). Anything not in the catalogue
gets a tidied version of its key name and lands in Other.
Each row shows its key combos as keycaps (Super + Shift + Left), one
combo per line, with or between alternatives. Forge rows are dimmed while
tiling is off (they only work while it's on).
| Control | What it does |
|---|---|
| Search box | Filters by description, key name and combo, e.g. swap, super shift, workspace |
| + | Add a custom shortcut |
| Clashes | Show only shortcuts that share a combo with another |
| Unassigned | Also show shortcuts that have no keys |
Click any unlocked row to open its editor. Changes go straight into your live GNOME settings, and every write is read back to make sure it stuck; if it didn't, you get an error instead of a silent failure.
In the editor you can:
- Set shortcut: press the combo you want.
- Or type it: e.g.
super+shift+left,ctrl+alt+t,super+f5. Modifier words accepted:super/win/meta,ctrl/control,alt,shift. Key words:left right up down enter esc tab space home end pageup pagedown delete backspace insert print,f1–f12, and symbols such as- = . , / ; ' \[ ] \`. - Add another combo: GNOME shortcuts can hold several (custom ones hold one).
- Remove a single combo, or Clear them all (the shortcut stays, unassigned).
- Reset to default: restores GNOME's default for that shortcut.
- For custom shortcuts: edit Name and Command, or Delete shortcut.
+ in the toolbar opens Add shortcut: a name, a command and a combo. New
custom shortcuts get the next free custom<N> slot.
A plain key on its own can't be bound, because it would stop you typing that
key everywhere. Include Super, Ctrl or Alt. The exceptions, fine on their
own: F1–F24, media keys (XF86…), Print, Pause, Scroll_Lock and Menu.
Rows with 🔒 can't be edited. Hover the lock for the reason.
| Lock text | Which rows | Why |
|---|---|---|
| Tiling key — managed by spark-tiles | every Forge row | spark-tiles sets them; edit them there |
| Set by Ubuntu Dock | dock app-hotkey-N rows |
the dock owns them |
| Set by tiling | the Spark Tiles terminal shortcut (SUPER+RETURN) |
spark-tiles owns it, always |
| Set by tiling — turn tiling off to edit | GNOME keys that spark-tiles borrowed |
while tiling is ON, spark-tiles off would restore its snapshot and undo your edit |
| Turn tiling off to add or delete shortcuts | the + button and Delete shortcut | same reason: the custom-shortcut list is in the snapshot |
"While tiling is ON" strictly means while spark-tiles has a restore
pending (its marker ~/.local/state/spark-tiles/active exists), even if
Forge itself is disabled. The borrowed keys are read from
~/.local/state/spark-tiles/gnome-settings.snapshot; if that can't be read,
every GNOME key is locked to be safe.
A ⚠ on a row means its combo is also used by another shortcut; hover it to see which. The Clashes toggle filters to just those rows.
When you save a combo that's already in use, what happens depends on its owner:
| Owner | Result |
|---|---|
| An ordinary, editable shortcut | Take over the shortcut? prompt: yes removes the combo from the other shortcut and gives it to this one. If the save then fails, the removal is undone. |
| A Forge tiling key | saved; the confirmation adds clashes with a tiling key |
| A locked shortcut | refused |
Combos are compared in a normalised form, so <Primary><Shift>d and
<Shift><Control>D count as the same key.
spark-menu keys --printprints Tiling: ON|OFF, then every assigned shortcut by group (Forge rows marked (tiling off) while
tiling is off), then any notes
about missing sources. It works over SSH or with no display. With no display,
spark-menu keys and spark-menu launch say so and exit instead of crashing,
and if GTK 4 / libadwaita are missing they point you to --print.
Spark Menu is the companion to spark-tiles (Spark Tiles, github.com/HarrisonAlexander/spark-tiles; Forge-based Omarchy-style
tiling on GNOME):
spark-tiles keysopens the keybindings window.- The launcher's Tiling group turns tiling on and off and shows its keys.
- The launcher sets its window class to
dev.spark.Launcher, andinstall.shadds a Forge float rule for it so the overlay is never tiled. - The editor respects every key
spark-tilesowns (see Locks).
None of this is required: without spark-tiles the Tiling group just isn't
shown, and without Forge its rows and the float rule are skipped.
- Symlinks
~/.local/bin/spark-menu→bin/spark-menuin this repo. - Adds two GNOME custom shortcuts (or updates them if present):
spark-menu-keys: Spark Menu: keybindings,<Super>kspark-menu-launch: Spark Menu: launcher,<Super>space
- Removes
<Super>spacefrom GNOME's Switch keyboard layout (org.gnome.desktop.wm.keybindings switch-input-source); any other layout key you had stays. - If Forge is installed, adds
{"wmClass": "dev.spark.Launcher", "mode": "float"}to~/.config/forge/config/windows.json, backing up the original once towindows.json.pre-spark-menu.
It adds nothing to autostart and starts no services.
SUPER+B (the JBL toggle) is not set by this installer; it belongs to
the separate bluetooth script's setup.
rm ~/.local/bin/spark-menuThen remove the two custom shortcuts (open the keybindings window first and
delete Spark Menu: keybindings / Spark Menu: launcher, or use GNOME
Settings › Keyboard › Custom Shortcuts). Put <Super>space back on layout
switching if you want it:
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Super>space', 'XF86Keyboard']"Restore Forge's window config from ~/.config/forge/config/windows.json.pre-spark-menu
if you want the float rule gone. If you hid the dock, show it again with
gnome-extensions enable ubuntu-dock@ubuntu.com.
bin/spark-menu entry point (works from the repo or via the ~/.local/bin symlink)
install.sh shortcuts, layout-key move, Forge float rule
spark_menu/
cli.py `spark-menu keys [--print]` and `spark-menu launch`
keymap/ shortcuts — no GTK
sources.py reads every schema with `gsettings list-recursively`
catalog.py plain-English descriptions and groups
model.py Entry objects, filtering, grouping, loading
accel.py normalising, displaying and parsing key combos
conflicts.py clash detection and save checks (block / warn / take over)
locks.py which rows are locked and why
writer.py gsettings writes with read-back, custom add/update/delete, take-over with undo
launcher/ launcher logic — no GTK, no Gio
items.py the menu tree (Apps, Keybindings, speaker, Tiling, System)
actions.py finding commands, tiling and dock state
search.py ranked search across every action
nav.py levels, back, breadcrumb
confirm.py the Enter-release / delay gate
run.py starting commands and notifying on failure
forge_rule.py the Forge float override
app/ GTK 4 / libadwaita windows
window.py keybindings window
editor.py shortcut editor dialogs
launcher.py launcher overlay
apps.py installed apps via Gio
docs/superpowers/ design specs and implementation plans
tests/ pytest suite (no display needed)
Everything outside spark_menu/app/ is plain Python with injectable
gsettings runners, file paths and clocks, which is what makes it testable
without a desktop.
cd ~/projects/spark-menu
python3 -m pytest -qAbout 100 tests covering reading and describing shortcuts, combo parsing, clashes, locks, writes and take-over rollback, the CLI, the launcher tree, search, navigation, the Enter gate, command running and the Forge rule. None of them need a display or change your real settings.
Items live in spark_menu/launcher/items.py (build_tree). An action is an
Item with an id, label, kind="action", an icon name, and a command
argv tuple. Useful fields:
tag: right-hand text ("SUPER+B","ON")location: shown next to search resultskeywords: extra search wordsconfirm: a question to ask first (Enter = yes, Esc = no)wait=True: wait for the command and notify if it fails
If it depends on a command that may be missing, resolve it in
launcher/actions.py (find_commands checks PATH, then ~/.local/bin) and
only add the item when it's found. If it shows state (like the tiling and
dock toggles), compute the state in app/launcher.py and pass it into
build_tree. Add a test in tests/test_launcher_tree.py.
| Symptom | Fix |
|---|---|
SUPER+SPACE switches keyboard layout instead |
run install.sh again |
Shortcuts vanished after spark-tiles off |
they were added while tiling was ON; run install.sh again with tiling OFF |
| Launcher opens tiled instead of full-screen | Forge float rule missing: run install.sh, or check ~/.config/forge/config/windows.json for dev.spark.Launcher |
Tiling keys (SUPER+J, SUPER+arrows) do nothing while tiling is ON |
that workspace is set to floating (Forge workspace-skip-tile, e.g. '0' = workspace 1); it's not a shortcut, so it won't show here. Clear it: gsettings --schemadir ~/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas set org.gnome.shell.extensions.forge workspace-skip-tile "''". spark-tiles no longer binds the toggle that set it (SUPER+L, removed 2026-11-30) |
| A row won't open the editor | it's locked; hover the 🔒. Turn tiling off for borrowed GNOME keys |
| "GTK 4 / libadwaita unavailable" | sudo apt-get install python3-gi gir1.2-gtk-4.0 gir1.2-adw-1 |
| A toggle seems to do nothing | look for the desktop notification; it carries the command's error |
| The dock toggle is missing | the Ubuntu Dock extension isn't installed (gnome-extensions info ubuntu-dock@ubuntu.com) |