Added backup timestamps to various omarchy-refresh-* files to prevent clobbering (#402)

* Added backup timestamps to omarchy-refresh-[hyprlock|swayosd|walker|waybar] scripts to prevent data loss if ran multiple times

* Added new script (omarchy-refresh-config) for refreshing various config files with automated backup creation
This commit is contained in:
Andy Davis
2025-07-30 10:12:37 -04:00
committed by GitHub
parent d4f6859022
commit ff5630c64f
5 changed files with 37 additions and 45 deletions

View File

@ -1,11 +1,4 @@
#!/bin/bash
# Overwrite local Hyprlock settings with the latest in Omarchy, but create a backup if it differs
cp -f ~/.config/hypr/hyprlock.conf ~/.config/hypr/hyprlock.conf.bak 2>/dev/null
cp -f ~/.local/share/omarchy/config/hypr/hyprlock.conf ~/.config/hypr/ 2>/dev/null
if cmp -s ~/.config/hypr/hyprlock.conf.bak ~/.config/hypr/hyprlock.conf; then
rm ~/.config/hypr/hyprlock.conf.bak
else
echo -e "\e[31mExisting .config/hypr/hyprlock.conf replaced with new Omarchy default, but a .bak file was made.\e[0m"
fi
# Overwrite local Hyprlock settings with the latest in Omarchy
omarchy-refresh-config hypr/hyprlock.conf