Don't hardcode snapper configs, read the config list first

This commit is contained in:
Michiel Ryvers
2025-08-27 11:08:16 +02:00
parent 2d12085eb1
commit 613f4a473d

View File

@@ -16,7 +16,10 @@ case "$COMMAND" in
create)
DESC="$(omarchy-version)"
for config in root home; do
# Get existing snapper config names from CSV output
mapfile -t CONFIGS < <(sudo snapper --csvout list-configs | awk -F, 'NR>1 {print $1}')
for config in "${CONFIGS[@]}"; do
sudo snapper -c "$config" create -c number -d "$DESC"
done
;;