From 8d6ea817dd587b1c46922fd637defacdc5b1e0e9 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 24 Jul 2026 12:24:09 -0700 Subject: [PATCH] Title-case theme names in one pass Co-Authored-By: Claude Opus 5 (1M context) --- bin/omarchy-theme-current | 2 +- bin/omarchy-theme-list | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/omarchy-theme-current b/bin/omarchy-theme-current index edc6a462..1a9072cb 100755 --- a/bin/omarchy-theme-current +++ b/bin/omarchy-theme-current @@ -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 diff --git a/bin/omarchy-theme-list b/bin/omarchy-theme-list index 0b901fc0..318347b5 100755 --- a/bin/omarchy-theme-list +++ b/bin/omarchy-theme-list @@ -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'