Make --exec take the command as rest-of-line words

Replace --exec-arg with an ergonomic --exec that consumes the rest of the line
as the click command. The caller's shell tokenizes the words into discrete
arguments before the tool sees them, and the shell runs them as positional
parameters (never a re-parsed string), so safety is identical to the argv form
while the call sites read naturally: `--exec omarchy toggle something`.

Crucially the tool never splits a string itself — a single quoted whole-command
argument is rejected and points at the unquoted form, because whitespace-
splitting a string hands argument boundaries to whoever controls its content
(the injection we are avoiding). --exec must come last; migrate every caller.
This commit is contained in:
Ryan Hughes
2026-08-23 14:26:25 -04:00
parent eb988b42e6
commit bf2013e6f3
21 changed files with 148 additions and 113 deletions
+1 -1
View File
@@ -5,5 +5,5 @@ set -e
if omarchy-done ensure voxtype-install-invitation; then
omarchy-notification-send -u critical -g  "Install Dictation with Voxtype" \
"Click to install voice dictation for Omarchy." \
--exec-arg omarchy-launch-floating-terminal-with-presentation --exec-arg omarchy-voxtype-install
--exec omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install
fi
+1 -1
View File
@@ -7,5 +7,5 @@ set -e
if [[ -z $(omarchy-default-agent) ]] && omarchy-done ensure agent-setup-invitation; then
omarchy-notification-send -u critical -g 󰚩 "Set your default agent" \
"Let your favorite agent help with Omarchy." \
--exec-arg omarchy --exec-arg menu --exec-arg summon --exec-arg setup.default.agent
--exec omarchy menu summon setup.default.agent
fi
@@ -8,5 +8,5 @@ if omarchy-hw-fingerprint && [[ ! -f /etc/pam.d/omarchy-lock-fingerprint ]] &&
omarchy-done ensure fingerprint-setup-invitation; then
omarchy-notification-send -u critical -g 󰈷 "Setup Fingerprint Reader" \
"Enable sudo and unlocking with your fingerprint." \
--exec-arg omarchy-launch-floating-terminal-with-presentation --exec-arg omarchy-setup-security-fingerprint
--exec omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-fingerprint
fi
+1 -1
View File
@@ -2,4 +2,4 @@
# elides past three lines.
omarchy-notification-send -u critical -g  "Learn Keybindings" \
$'Super + K for cheatsheet.\nSuper + Space for Omarchy Menu.' \
--exec-arg omarchy-menu-keybindings
--exec omarchy-menu-keybindings
+2 -2
View File
@@ -1,11 +1,11 @@
notify_update() {
omarchy-notification-send -u critical -g  "Update System" "Click to update the system." \
--exec-arg omarchy-launch-floating-terminal-with-presentation --exec-arg omarchy-update
--exec omarchy-launch-floating-terminal-with-presentation omarchy-update
}
notify_wifi() {
omarchy-notification-send -u critical -g 󰖩 "Setup Wi-Fi" "Click to configure the wireless network." \
--exec-arg omarchy-shell --exec-arg shell --exec-arg toggle --exec-arg omarchy.network
--exec omarchy-shell shell toggle omarchy.network
}
announce_network() {