Files
omarchycn/bin/omarchy-branding-about
David Heinemeier HanssonandClaude Fable 5 87940c3cf4 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>
2026-08-01 19:55:02 -05:00

29 lines
875 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Edit, set, or reset About branding
# omarchy:group=branding
# omarchy:name=about
# omarchy:args=<image|text|reset>
# omarchy:examples=omarchy branding about image | omarchy branding about text | omarchy branding about reset
set -euo pipefail
case "${1:-}" in
image)
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
;;
text)
omarchy-launch-editor ~/.config/omarchy/branding/about.txt >/dev/null 2>&1 && omarchy-launch-about >/dev/null 2>&1
;;
reset)
cp "$OMARCHY_PATH/icon.txt" ~/.config/omarchy/branding/about.txt && omarchy-launch-about >/dev/null 2>&1
;;
*)
echo "Usage: omarchy-branding-about <image|text|reset>" >&2
exit 1
;;
esac