Title-case theme names in one pass

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-07-24 12:24:09 -07:00
co-authored by Claude Opus 5
parent a2ec713603
commit 8d6ea817dd
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
THEME_NAME_PATH="$HOME/.local/state/omarchy/current/theme.name" THEME_NAME_PATH="$HOME/.local/state/omarchy/current/theme.name"
if [[ -f $THEME_NAME_PATH ]]; then if [[ -f $THEME_NAME_PATH ]]; then
cat $THEME_NAME_PATH | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g' sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g' "$THEME_NAME_PATH"
else else
echo "Unknown" echo "Unknown"
fi fi
+1 -3
View File
@@ -6,6 +6,4 @@
{ {
find ~/.config/omarchy/themes/ -mindepth 1 -maxdepth 1 \( -type d -o -type l \) -printf '%f\n' find ~/.config/omarchy/themes/ -mindepth 1 -maxdepth 1 \( -type d -o -type l \) -printf '%f\n'
find "$OMARCHY_PATH/themes/" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' find "$OMARCHY_PATH/themes/" -mindepth 1 -maxdepth 1 -type d -printf '%f\n'
} | sort -u | while read -r name; do } | sort -u | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g'
echo "$name" | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g'
done