mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Check for weather once a minute instead of once every ten
More accurate and deals with the first-boot issue on network too
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
"custom/weather": {
|
||||
"exec": "$OMARCHY_PATH/default/waybar/weather.sh",
|
||||
"return-type": "json",
|
||||
"interval": 600,
|
||||
"interval": 60,
|
||||
"tooltip": false,
|
||||
"on-click": "notify-send -u low \"$(omarchy-weather-status)\""
|
||||
},
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Delay startup to allow network initialization after boot
|
||||
sleep 5
|
||||
|
||||
icon=$(omarchy-weather-icon 2>/dev/null)
|
||||
|
||||
if [[ -n $icon ]]; then
|
||||
|
||||
@@ -6,7 +6,7 @@ WAYBAR_STYLE="$HOME/.config/waybar/style.css"
|
||||
if [[ -f $WAYBAR_CONFIG ]]; then
|
||||
if ! grep -q '"custom/weather"' "$WAYBAR_CONFIG"; then
|
||||
sed -i 's/"modules-center": \["clock",/"modules-center": ["clock", "custom\/weather",/' "$WAYBAR_CONFIG"
|
||||
sed -i '/"network": {/i\ "custom/weather": {\n "exec": "$OMARCHY_PATH/default/waybar/weather.sh",\n "return-type": "json",\n "interval": 600,\n "tooltip": false,\n "on-click": "notify-send -u low \\"$(omarchy-weather-status)\\""\n },' "$WAYBAR_CONFIG"
|
||||
sed -i '/"network": {/i\ "custom/weather": {\n "exec": "$OMARCHY_PATH/default/waybar/weather.sh",\n "return-type": "json",\n "interval": 60,\n "tooltip": false,\n "on-click": "notify-send -u low \\"$(omarchy-weather-status)\\""\n },' "$WAYBAR_CONFIG"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user