Files
arthur-os/bin/omarchy-install-app
Ryan Hughes 4a665af581 Drop bin/omarchy-menu; sweep JSONC actions to bare commands
The shell now owns the menu — both data and dispatch. The 821-line bash
bin was carrying the open path (cold spawn + jq pipeline + tempfile dance
+ IPC + poll) and a grab-bag of helpers that only existed inside it. Both
go away in this commit.

New bins for the few composite helpers that were genuinely worth keeping:

  - omarchy-install-app NAME PKG
  - omarchy-install-and-launch NAME PKG DESKTOP_ID
  - omarchy-install-font LABEL PKG FAMILY
  - omarchy-launch-config-editor PATH
  - omarchy-reminder-set-interactive
  - omarchy-capture-screenrecording-with-webcam

Sweep through default/omarchy/omarchy-menu.jsonc rewrites:

  - present_terminal X   -> omarchy-launch-floating-terminal-with-presentation X
  - install_terminal X   -> omarchy-launch-floating-terminal-with-presentation 'omarchy-install-terminal X'
  - install / install_and_launch / install_font / open_in_editor -> new bins above
  - terminal X           -> xdg-terminal-exec --app-id=org.omarchy.terminal X
  - default_browser_is X -> [[ "$(omarchy-default-browser)" == "X" ]]
  - default_terminal_is X / default_editor_is X / haptic_touchpad_is X same shape
  - $(hypr_config_file X) -> ~/.config/hypr/X.lua
  - show_custom_reminder_input -> omarchy-reminder-set-interactive
  - screenrecord_with_webcam   -> omarchy-capture-screenrecording-with-webcam
  - stop_active_screenrecording -> omarchy-capture-screenrecording --stop-recording

Hyprland bindings switch from `omarchy-menu X` to
`omarchy-shell-ipc menu summon X` (the keybind hot path now skips bash
entirely). The Bar.qml omarchy widget and the battery right-click do the
same. ALT+PRINT becomes a one-liner: stop the recording if one is going,
otherwise summon the screenrecord submenu.

Measured: keybind-to-visible is ~30ms (was ~235ms). The shell's plugin
keepLoaded:true stops being theoretical \u2014 the menu data lives in memory
across opens, and the only work between keypress and paint is the IPC
roundtrip and the layer-shell window mount.
2026-05-14 17:43:12 -04:00

16 lines
472 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Install a packaged app, surfacing the install in a floating terminal
# omarchy:args=<display-name> <packages>
# omarchy:examples=omarchy install app 'LM Studio' lmstudio-bin
name="${1-}"
packages="${2-}"
if [[ -z $name || -z $packages ]]; then
echo "Usage: omarchy-install-app <display-name> <packages>" >&2
exit 1
fi
exec omarchy-launch-floating-terminal-with-presentation "echo 'Installing ${name}...'; omarchy-pkg-add ${packages}"