Files
Nomarchy/themes/engine/scripts/nomarchy-theme-set-obsidian
Bernardo Magri bbdf34ced8 refactor: implement component-based architecture for enhanced maintainability
- Reorganize directory structure into core/, features/, and themes/
- Colocate application Nix logic, configs, scripts, and theme overrides
- Implement 'Inversion of Control' for theming: apps now pull theme-specific layouts
- Update flake.nix and shared library paths to match the new structure
- Document the new Feature-Centric architecture in README.md
2026-04-12 14:51:15 +01:00

28 lines
787 B
Bash
Executable File

#!/bin/bash
# Sync Nomarchy theme to all Obsidian vaults
CURRENT_THEME_DIR="$HOME/.config/nomarchy/current/theme"
[[ -f $CURRENT_THEME_DIR/obsidian.css ]] || exit 0
jq -r '.vaults | values[].path' ~/.config/obsidian/obsidian.json 2>/dev/null | while read -r vault_path; do
[[ -d $vault_path/.obsidian ]] || continue
theme_dir="$vault_path/.obsidian/themes/Nomarchy"
mkdir -p "$theme_dir"
[[ -f $theme_dir/manifest.json ]] || cat >"$theme_dir/manifest.json" <<'EOF'
{
"name": "Nomarchy",
"version": "1.0.0",
"minAppVersion": "0.16.0",
"description": "Automatically syncs with your current Nomarchy system theme colors and fonts",
"author": "Nomarchy",
"authorUrl": "https://nomarchy.org"
}
EOF
cp "$CURRENT_THEME_DIR/obsidian.css" "$theme_dir/theme.css"
done