aboutsummaryrefslogtreecommitdiffstats
path: root/copy.sh
diff options
context:
space:
mode:
authorDon Williams <Don.e.williams@gmail.com>2026-02-19 01:01:59 -0500
committerDon Williams <Don.e.williams@gmail.com>2026-02-19 01:01:59 -0500
commit7a7334f1ce95ea946506b37193ef4fb71f8f6744 (patch)
tree535f1b6f2457c6d95b39b1f389e6d65dc6e95a8a /copy.sh
parent17faea007e32355bc52a0f639746dc9b549e6218 (diff)
Added config files for waybar-weather Added settinmgs to toggle C/F
On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md renamed: update-dots.sh -> archive/update-dots.sh modified: config/hypr/scripts/Kool_Quick_Settings.sh new file: config/hypr/scripts/Toggle-weather-waybar-units.sh new file: config/waybar-weather/cityname.txt new file: config/waybar-weather/config.toml new file: config/waybar-weather/geolocation.txt modified: copy.sh
Diffstat (limited to 'copy.sh')
-rwxr-xr-xcopy.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/copy.sh b/copy.sh
index ea582fca..8d04ef4e 100755
--- a/copy.sh
+++ b/copy.sh
@@ -415,6 +415,47 @@ printf "\n%.0s" {1..1}
printf "${INFO} - Copying dotfiles ${SKY_BLUE}second${RESET} part\n"
copy_phase2 "$LOG"
printf "\\n%.0s" {1..1}
+# Non-express upgrades: copy waybar-weather config and optionally set units
+if [ "$UPGRADE_MODE" -eq 1 ] && [ "$EXPRESS_MODE" -eq 0 ]; then
+ WAYBAR_WEATHER_SRC="$DOTFILES_DIR/config/waybar-weather"
+ WAYBAR_WEATHER_DEST="$HOME/.config/waybar-weather"
+ if [ -d "$WAYBAR_WEATHER_SRC" ]; then
+ echo "${INFO} - Copying waybar-weather config for upgrade" 2>&1 | tee -a "$LOG"
+ mkdir -p "$WAYBAR_WEATHER_DEST"
+ cp -r "$WAYBAR_WEATHER_SRC/." "$WAYBAR_WEATHER_DEST/" 2>&1 | tee -a "$LOG"
+ else
+ echo "${WARN} - waybar-weather config not found at $WAYBAR_WEATHER_SRC" 2>&1 | tee -a "$LOG"
+ fi
+
+ while true; do
+ read -r -p "${CAT} Use Fahrenheit (F) or Celsius (C)? [C]: " WEATHER_UNITS
+ WEATHER_UNITS=$(echo "${WEATHER_UNITS}" | tr '[:upper:]' '[:lower:]')
+ case "$WEATHER_UNITS" in
+ f|fahrenheit)
+ WEATHER_CFG="$WAYBAR_WEATHER_DEST/config.toml"
+ if [ -f "$WEATHER_CFG" ]; then
+ if grep -qE '^[[:space:]]*units[[:space:]]*=' "$WEATHER_CFG"; then
+ sed -i 's/^[[:space:]]*units[[:space:]]*=.*/units = "imperial"/' "$WEATHER_CFG"
+ elif grep -qE '^[[:space:]]*#\s*units[[:space:]]*=' "$WEATHER_CFG"; then
+ sed -i 's/^[[:space:]]*#\s*units[[:space:]]*=.*/units = "imperial"/' "$WEATHER_CFG"
+ else
+ printf '\nunits = "imperial"\n' >> "$WEATHER_CFG"
+ fi
+ echo "${OK} - Set waybar-weather units to imperial" 2>&1 | tee -a "$LOG"
+ else
+ echo "${WARN} - waybar-weather config not found at $WEATHER_CFG" 2>&1 | tee -a "$LOG"
+ fi
+ break
+ ;;
+ c|celsius|"")
+ # Default config already uses metric; no change needed
+ break
+ ;;
+ *)
+ echo "${WARN} Please enter 'F' or 'C'." ;;
+ esac
+ done
+fi
# ags config
# Check if ags is installed
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage