mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-02 04:37:49 +02:00
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.
29 lines
711 B
Bash
Executable File
29 lines
711 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Prompt for a reminder duration + message and schedule it
|
|
# omarchy:examples=omarchy reminder set-interactive
|
|
|
|
set -e
|
|
|
|
prompt_minutes() {
|
|
while :; do
|
|
minutes=$(omarchy-menu-input "Remind in minutes") || exit 0
|
|
if [[ $minutes =~ ^[0-9]+$ ]] && (( minutes > 0 )); then
|
|
printf '%s' "$minutes"
|
|
return 0
|
|
fi
|
|
[[ -z $minutes ]] && exit 0
|
|
omarchy-notification-send "Invalid reminder" "Enter the number of minutes" -u critical
|
|
done
|
|
}
|
|
|
|
minutes=$(prompt_minutes)
|
|
[[ -n $minutes ]] || exit 0
|
|
|
|
message=$(omarchy-menu-input "Reminder message") || exit 0
|
|
if [[ -n $message ]]; then
|
|
omarchy-reminder "$minutes" "$message"
|
|
else
|
|
omarchy-reminder "$minutes"
|
|
fi
|