Refactor omarchy-refresh-waybar to use conditional confirmation

This commit is contained in:
Noah Penza
2025-07-10 06:59:06 +10:00
parent 6513db1bdd
commit 77e2e5f61e

View File

@ -1,11 +1,11 @@
#!/bin/bash
gum confirm "Refresh Waybar config? This will replace your current Waybar settings with Omarchy defaults." || exit 0
if gum confirm "Refresh Waybar config? This will replace your current Waybar settings with Omarchy defaults."; then
# Overwrite local waybar settings with the latest in Omarchy
cp -f ~/.local/share/omarchy/config/waybar/config ~/.config/waybar/ 2>/dev/null
cp -f ~/.local/share/omarchy/config/waybar/style.css ~/.config/waybar/ 2>/dev/null
# Overwrite local waybar settings with the latest in Omarchy
cp -f ~/.local/share/omarchy/config/waybar/config ~/.config/waybar/ 2>/dev/null
cp -f ~/.local/share/omarchy/config/waybar/style.css ~/.config/waybar/ 2>/dev/null
# Restart waybar
pkill waybar &>/dev/null
setsid waybar &>/dev/null &
# Restart waybar
pkill waybar &>/dev/null
setsid waybar &>/dev/null &
fi