aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
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 /config/hypr/scripts
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 'config/hypr/scripts')
-rwxr-xr-xconfig/hypr/scripts/Kool_Quick_Settings.sh2
-rwxr-xr-xconfig/hypr/scripts/Toggle-weather-waybar-units.sh33
2 files changed, 35 insertions, 0 deletions
diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh
index 2e4004c5..5081fe72 100755
--- a/config/hypr/scripts/Kool_Quick_Settings.sh
+++ b/config/hypr/scripts/Kool_Quick_Settings.sh
@@ -202,6 +202,7 @@ Choose Hyprland Animations
Choose Monitor Profiles
Choose Rofi Themes
Search for Keybinds
+Toggle Waybar Weather units (C/F)
Toggle Game Mode
Switch Dark-Light Theme
Rainbow Borders Mode
@@ -263,6 +264,7 @@ main() {
"Choose Monitor Profiles") $scriptsDir/MonitorProfiles.sh ;;
"Choose Rofi Themes") $scriptsDir/RofiThemeSelector.sh ;;
"Search for Keybinds") $scriptsDir/KeyBinds.sh ;;
+ "Toggle Waybar Weather units (C/F)") $scriptsDir/Toggle-weather-waybar-units.sh ;;
"Toggle Game Mode") $scriptsDir/GameMode.sh ;;
"Switch Dark-Light Theme") $scriptsDir/DarkLight.sh ;;
"Rainbow Borders Mode") rainbow_borders_menu ;;
diff --git a/config/hypr/scripts/Toggle-weather-waybar-units.sh b/config/hypr/scripts/Toggle-weather-waybar-units.sh
new file mode 100755
index 00000000..4007536c
--- /dev/null
+++ b/config/hypr/scripts/Toggle-weather-waybar-units.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# Toggle waybar-weather units between metric and imperial
+
+CONFIG_FILE="$HOME/.config/waybar-weather/config.toml"
+
+if [ ! -f "$CONFIG_FILE" ]; then
+ notify-send "Weather units" "Config not found: $CONFIG_FILE"
+ exit 1
+fi
+
+# Determine current units (default to metric when unset/commented)
+current_units="metric"
+if grep -qE '^[[:space:]]*units[[:space:]]*=' "$CONFIG_FILE"; then
+ current_units=$(sed -nE 's/^[[:space:]]*units[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' "$CONFIG_FILE" | head -n1)
+fi
+
+if [ "$current_units" = "imperial" ]; then
+ new_units="metric"
+else
+ new_units="imperial"
+fi
+
+# Update config: prefer replacing existing units line, otherwise uncomment default, else append
+if grep -qE '^[[:space:]]*units[[:space:]]*=' "$CONFIG_FILE"; then
+ sed -i 's/^[[:space:]]*units[[:space:]]*=.*/units = "'"$new_units"'"/' "$CONFIG_FILE"
+elif grep -qE '^[[:space:]]*#\s*units[[:space:]]*=' "$CONFIG_FILE"; then
+ sed -i 's/^[[:space:]]*#\s*units[[:space:]]*=.*/units = "'"$new_units"'"/' "$CONFIG_FILE"
+else
+ printf '\nunits = "%s"\n' "$new_units" >> "$CONFIG_FILE"
+fi
+
+pkill waybar-weather 2>/dev/null || true
+notify-send "Weather units now ${new_units}" "Click on waybar-weather to update units"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage