Title-case theme names in one pass
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
a2ec713603
commit
8d6ea817dd
@@ -6,7 +6,7 @@
|
||||
THEME_NAME_PATH="$HOME/.local/state/omarchy/current/theme.name"
|
||||
|
||||
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
|
||||
echo "Unknown"
|
||||
fi
|
||||
|
||||
@@ -6,6 +6,4 @@
|
||||
{
|
||||
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'
|
||||
} | sort -u | while read -r name; do
|
||||
echo "$name" | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g'
|
||||
done
|
||||
} | sort -u | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g'
|
||||
|
||||
Reference in New Issue
Block a user