Pick branding images with the portal file chooser
omarchy-file-select gains an --extensions filter, passed through the portal's native filters option, so the branding commands can offer only png/svg instead of walking a find-generated menu of Pictures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
84e87ce67e
commit
87940c3cf4
@@ -8,12 +8,10 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SOURCE_DIR="${XDG_PICTURES_DIR:-$HOME/Pictures}"
|
||||
|
||||
case "${1:-}" in
|
||||
image)
|
||||
image=$(omarchy-menu-file "Pick png/svg from $SOURCE_DIR" "${SOURCE_DIR}" "svg png")
|
||||
if [[ -n $image ]] && omarchy-transcode-ascii "$image" ~/.config/omarchy/branding/about.txt --width 54 --height 26; then
|
||||
image=$(omarchy-file-select --title "Pick PNG or SVG for About" --extensions "png svg")
|
||||
if omarchy-transcode-ascii "$image" ~/.config/omarchy/branding/about.txt --width 54 --height 26; then
|
||||
omarchy-launch-about >/dev/null 2>&1
|
||||
fi
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user