Initial import: Lua config, trimmed omarchy scripts, theme system
This commit is contained in:
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# archypr:summary=Pick one option with Walker
|
||||
# archypr:group=menu
|
||||
# archypr:name=select
|
||||
# archypr:args=prompt option... [-- walker args...]
|
||||
# archypr:examples=omarchy menu select Format jpg png|archypr-enu-select Resolution 4k 1080p 720p -- --width 400
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if (( $# < 2 )); then
|
||||
echo "Usage: archypr-menu-select <prompt> <option>... [-- walker args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
prompt="$1"
|
||||
shift
|
||||
|
||||
options=()
|
||||
walker_args=()
|
||||
|
||||
while (( $# > 0 )); do
|
||||
if [[ $1 == "--" ]]; then
|
||||
shift
|
||||
walker_args=("$@")
|
||||
break
|
||||
fi
|
||||
|
||||
options+=("$1")
|
||||
shift
|
||||
done
|
||||
|
||||
if (( ${#options[@]} == 0 )); then
|
||||
echo "Usage: archypr-menu-select <prompt> <option>... [-- walker args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s\n' "${options[@]}" | archypr-launch-walker --dmenu --width 295 --minheight 1 --maxheight 300 -p "$prompt…" "${walker_args[@]}" 2>/dev/null
|
||||
Reference in New Issue
Block a user