All checks were successful
Check / eval (push) Successful in 3m57s
Bernardo: "opening claude-code is too disruptive". SUPER+CTRL+A spent a terminal, an npm fetch and a REPL on "what's the syntax for…" — the prompt was the right surface, the destination was not. The query is now URL-encoded into the provider's web chat and handed to xdg-open. settings.ask.provider (claude|chatgpt|gemini|grok, default claude) with a Preferences row, read from state at RUN TIME so switching needs no rebuild, and any unknown/absent value falls back rather than opening nothing. He asked for chatgpt + grok alongside claude/gemini, and for the CLI to go: claude-code is deleted and pkgs.nodejs leaves with it (carried only for that npx). Keybind is "Ask AI" now the destination is the user's. The failure mode is the design point: prefill is undocumented on all four vendors, each can drop `?q=` unilaterally, and it fails SILENTLY — you land in an empty chat having already typed the question. So the query is also copied to the clipboard (a vendor breaking change costs one paste, not the question), and the URLs sit in one attrset so the repair is one line. Verified against the generated script: bash -n clean; every bad state value (unset/null/garbage) falls back to claude; a hostile query encodes correctly (& → %26, ? → %3F, # → %23, $(whoami) neutralised, café → caf%C3%A9). NOT verified on purpose: whether each vendor fills the box or auto-submits — that means posting into Bernardo's own accounts. Sweep: ROADMAP's shipped-modules line described the npx REPL; nix-ld's comment cited claude-code as its example; both fixed. Menu row + keybind renamed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
114 lines
9.9 KiB
Nix
114 lines
9.9 KiB
Nix
# Canonical keybind list — the single source of truth for BOTH the
|
|
# Hyprland `bind` strings (hyprland.nix) and the SUPER+? cheatsheet
|
|
# rendered by nomarchy-menu (rofi.nix). One place, no second renderer to
|
|
# keep in sync — the same rule the theme pipeline follows.
|
|
#
|
|
# mods — modifier string, Hyprland syntax ("$mod", "$mod SHIFT", "")
|
|
# key — the key name
|
|
# action — the Hyprland dispatcher (+args) that the bind runs
|
|
# desc — human label, shown in the cheatsheet
|
|
# group — cheatsheet section: Window | Workspace | Menu | Media (#108)
|
|
#
|
|
# `extra` holds cheatsheet-only rows for binds generated elsewhere
|
|
# (per-workspace numbers, mouse drags) so they still show up under SUPER+?.
|
|
{
|
|
binds = [
|
|
{ mods = "$mod"; key = "Return"; action = "exec, $terminal"; desc = "Open terminal"; group = "Window"; }
|
|
{ mods = "$mod"; key = "Space"; action = "exec, rofi -show drun -theme launcher"; desc = "App launcher"; group = "Menu"; }
|
|
{ mods = "$mod"; key = "M"; action = "exec, nomarchy-menu"; desc = "Main menu"; group = "Menu"; }
|
|
{ mods = "$mod"; key = "E"; action = "exec, $terminal -e yazi"; desc = "File manager (yazi)"; group = "Window"; }
|
|
{ mods = "$mod"; key = "Q"; action = "killactive"; desc = "Close window"; group = "Window"; }
|
|
{ mods = "$mod"; key = "F"; action = "fullscreen"; desc = "Fullscreen"; group = "Window"; }
|
|
{ mods = "$mod"; key = "V"; action = "togglefloating"; desc = "Toggle floating"; group = "Window"; }
|
|
{ mods = "$mod SHIFT"; key = "E"; action = "exit"; desc = "Exit Hyprland"; group = "Window"; }
|
|
|
|
# Theme picker (menu dispatcher): apply writes the state and runs
|
|
# home-manager switch (progress via notify-send).
|
|
{ mods = "$mod"; key = "T"; action = "exec, nomarchy-menu theme"; desc = "Theme picker"; group = "Menu"; }
|
|
# Cycle the current theme's wallpapers (instant, no rebuild).
|
|
{ mods = "$mod SHIFT"; key = "T"; action = "exec, nomarchy-state-sync bg next"; desc = "Next wallpaper"; group = "Menu"; }
|
|
|
|
# Power menu via the dispatcher. Not Escape: Super+Escape gets
|
|
# swallowed before reaching the dispatcher on some setups.
|
|
{ mods = "$mod"; key = "X"; action = "exec, nomarchy-menu power"; desc = "Power menu"; group = "Menu"; }
|
|
|
|
{ mods = "$mod"; key = "N"; action = "exec, swaync-client -t"; desc = "Notification centre"; group = "Media"; }
|
|
# SUPER+? — ? is Shift+/. SHIFT stays in the modmask (you hold it), but
|
|
# the keysym must be the BASE key `slash`, not `question`: Hyprland
|
|
# resolves the sym with Shift consumed, so `question` never matches while
|
|
# Shift is down — same as the `$mod SHIFT, 1` workspace binds. (item 26
|
|
# fixed the modmask but kept the shifted keysym → still dead; item 32.)
|
|
# The cheatsheet still renders this row as SUPER + ? (rofi.nix).
|
|
{ mods = "$mod SHIFT"; key = "slash"; action = "exec, nomarchy-menu keybinds"; desc = "Keybindings cheatsheet"; group = "Menu"; }
|
|
|
|
# Menu functions — SUPER+CTRL+<mnemonic> jumps straight to a
|
|
# nomarchy-menu module (all also reachable from the SUPER+M picker).
|
|
{ mods = "$mod CTRL"; key = "V"; action = "exec, nomarchy-menu clipboard"; desc = "Clipboard history"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "C"; action = "exec, nomarchy-menu calc"; desc = "Calculator"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "W"; action = "exec, nomarchy-menu web"; desc = "Web search"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "F"; action = "exec, nomarchy-menu files"; desc = "File search"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "E"; action = "exec, nomarchy-menu emoji"; desc = "Emoji picker"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "N"; action = "exec, nomarchy-menu network"; desc = "Network (networkmanager_dmenu)"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "B"; action = "exec, nomarchy-menu bluetooth"; desc = "Bluetooth"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "R"; action = "exec, nomarchy-menu airplane"; desc = "Airplane mode (Wi-Fi + Bluetooth)"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "K"; action = "exec, nomarchy-menu keyboard"; desc = "Keyboard layout"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "S"; action = "exec, nomarchy-menu capture"; desc = "Screenshot / capture"; group = "Media"; }
|
|
{ mods = "$mod CTRL"; key = "P"; action = "exec, nomarchy-menu colorpicker"; desc = "Color picker (→ clipboard)"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "A"; action = "exec, nomarchy-menu ask"; desc = "Ask AI"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "D"; action = "exec, nomarchy-menu dnd"; desc = "Do Not Disturb toggle"; group = "Media"; }
|
|
# I as in "settings" muscle memory (Super+I elsewhere); T for Tools.
|
|
{ mods = "$mod CTRL"; key = "I"; action = "exec, nomarchy-menu system"; desc = "System menu"; group = "Menu"; }
|
|
{ mods = "$mod CTRL"; key = "T"; action = "exec, nomarchy-menu tools"; desc = "Tools menu"; group = "Menu"; }
|
|
# The one SUPER+CTRL row that is not a menu module: lock earns the
|
|
# family slot because bare SUPER+L is a common app bind and Escape is
|
|
# unusable (see the power-menu note above). Same dispatcher the power
|
|
# menu's Lock row uses (rofi.nix) — logind, not `hyprlock` directly, so
|
|
# the session is marked locked and hypridle's lock_cmd stays the one
|
|
# place that decides how a lock actually looks.
|
|
{ mods = "$mod CTRL"; key = "L"; action = "exec, loginctl lock-session"; desc = "Lock screen"; group = "Menu"; }
|
|
{ mods = "$mod SHIFT"; key = "C"; action = "exec, hyprpicker -a"; desc = "Color picker (→ clipboard)"; group = "Menu"; }
|
|
# #127: dump display state to ~/nomarchy-display-dump-*.txt without SSH.
|
|
# If the seat is locked, hyprlock may swallow this — use Ctrl+Alt+F3 and
|
|
# run `nomarchy-display-dump` / `nomarchy-display-wake` on the TTY instead.
|
|
{ mods = "$mod SHIFT"; key = "D"; action = "exec, nomarchy-display-dump keybind"; desc = "Dump display diagnostics (~/)"; group = "Menu"; }
|
|
|
|
# Focus — SUPER + arrow keys.
|
|
{ mods = "$mod"; key = "left"; action = "movefocus, l"; desc = "Focus left"; group = "Window"; }
|
|
{ mods = "$mod"; key = "right"; action = "movefocus, r"; desc = "Focus right"; group = "Window"; }
|
|
{ mods = "$mod"; key = "up"; action = "movefocus, u"; desc = "Focus up"; group = "Window"; }
|
|
{ mods = "$mod"; key = "down"; action = "movefocus, d"; desc = "Focus down"; group = "Window"; }
|
|
|
|
# Multi-monitor workspace movement — SUPER + ALT + arrow keys.
|
|
{ mods = "$mod ALT"; key = "left"; action = "movecurrentworkspacetomonitor, l"; desc = "Move workspace to left monitor"; group = "Workspace"; }
|
|
{ mods = "$mod ALT"; key = "right"; action = "movecurrentworkspacetomonitor, r"; desc = "Move workspace to right monitor"; group = "Workspace"; }
|
|
{ mods = "$mod ALT"; key = "up"; action = "movecurrentworkspacetomonitor, u"; desc = "Move workspace to upper monitor"; group = "Workspace"; }
|
|
{ mods = "$mod ALT"; key = "down"; action = "movecurrentworkspacetomonitor, d"; desc = "Move workspace to lower monitor"; group = "Workspace"; }
|
|
|
|
# Screenshots (the menu's Capture module has the rest: OCR, recording).
|
|
# Bare Print → region to clipboard; the two → file binds save a
|
|
# timestamped PNG under ~/Pictures/Screenshots and toast the path, the
|
|
# same plumbing the Capture menu's "→ file" rows use.
|
|
{ mods = ""; key = "Print"; action = "exec, grim -g \"$(slurp)\" - | wl-copy && notify-send Screenshot \"Region copied to clipboard.\""; desc = "Screenshot region → clipboard"; group = "Media"; }
|
|
{ mods = "SHIFT"; key = "Print"; action = "exec, f=$HOME/Pictures/Screenshots/$(date +%Y%m%d-%H%M%S).png; mkdir -p $HOME/Pictures/Screenshots && grim -g \"$(slurp)\" \"$f\" && notify-send \"Screenshot saved\" \"$f\""; desc = "Screenshot region → file"; group = "Media"; }
|
|
{ mods = "CTRL"; key = "Print"; action = "exec, f=$HOME/Pictures/Screenshots/$(date +%Y%m%d-%H%M%S).png; mkdir -p $HOME/Pictures/Screenshots && grim \"$f\" && notify-send \"Screenshot saved\" \"$f\""; desc = "Screenshot screen → file"; group = "Media"; }
|
|
{ mods = "$mod SHIFT"; key = "Print"; action = "exec, f=$HOME/Pictures/Screenshots/$(date +%Y%m%d-%H%M%S).png; mkdir -p $HOME/Pictures/Screenshots && grim -g \"$(slurp)\" - | satty --filename - --fullscreen --output-filename \"$f\""; desc = "Annotate region"; group = "Media"; }
|
|
];
|
|
|
|
# Rendered only when the session has >1 layout (a comma in
|
|
# nomarchy.keyboard.layout) — hyprland.nix and rofi.nix both gate on
|
|
# that same condition, so the bind and its cheatsheet row stay in
|
|
# step. `current` targets the focused keyboard, so a board with its
|
|
# own per-device layout (a single one) is a no-op, never a leak.
|
|
multiLayoutBinds = [
|
|
{ mods = "$mod SHIFT"; key = "K"; action = "exec, hyprctl switchxkblayout current next"; desc = "Cycle keyboard layout"; group = "Menu"; }
|
|
];
|
|
|
|
extra = [
|
|
{ keys = "SUPER + 1-9, 0"; desc = "Switch to workspace 1-10 (0 = 10)"; group = "Workspace"; }
|
|
{ keys = "SUPER + SHIFT + 1-9, 0"; desc = "Move window to workspace 1-10 (0 = 10)"; group = "Workspace"; }
|
|
{ keys = "SUPER + drag"; desc = "Move (LMB) / resize (RMB) window"; group = "Window"; }
|
|
{ keys = "Volume / Brightness"; desc = "Hardware keys, shown via the OSD"; group = "Media"; }
|
|
{ keys = "Bar: click"; desc = "Caffeine — hold the screen awake (idle inhibitor)"; group = "Media"; }
|
|
];
|
|
}
|