#!/bin/bash

if gum confirm "Refresh Waybar config? This will replace your current settings with Omarchy defaults."; then
  # Overwrite local waybar settings with the latest in Omarchy
  cp -f ~/.local/share/omarchy/config/waybar/config.jsonc ~/.config/waybar/ 2>/dev/null
  cp -f ~/.local/share/omarchy/config/waybar/style.css ~/.config/waybar/ 2>/dev/null

  # Restart waybar
  pkill waybar
  setsid waybar >/dev/null 2>&1 &
fi
