#!/bin/bash

# omarchy:summary=List the user-installed themes that came from a git clone
# omarchy:examples=omarchy theme extras

# Exits nonzero when there are none, so a caller can ask whether any exist
# without reading the list. A symlinked theme is someone's working copy and a
# `.git` file is a worktree pointing elsewhere; neither is ours to pull.
status=1

for theme in ~/.config/omarchy/themes/*; do
  [[ ! -L $theme && -d $theme/.git ]] || continue
  echo "$theme"
  status=0
done

exit $status
