add weather widget to waybar
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
"tooltip": false
|
||||
},
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["custom/network", "cpu", "battery"],
|
||||
"modules-right": ["custom/weather", "custom/network", "cpu", "battery"],
|
||||
|
||||
"niri/workspaces": {
|
||||
"disable-scroll": true
|
||||
@@ -22,6 +22,13 @@
|
||||
"interval": 60
|
||||
},
|
||||
|
||||
"custom/weather": {
|
||||
"exec": "~/.local/bin/waybar-weather.sh",
|
||||
"interval": 1800,
|
||||
"format": "{}",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/network": {
|
||||
"exec": "~/.local/bin/waybar-network.sh",
|
||||
"interval": 2,
|
||||
|
||||
@@ -41,6 +41,11 @@ window#waybar {
|
||||
color: #f3eeea;
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
color: #f3eeea;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
#custom-network {
|
||||
color: #f3eeea;
|
||||
padding: 0 8px;
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
result=$(curl -sf --max-time 10 "wttr.in/?format=%c+%t")
|
||||
if [ $? -eq 0 ] && [ -n "$result" ]; then
|
||||
echo "$result"
|
||||
else
|
||||
echo "N/A"
|
||||
fi
|
||||
Reference in New Issue
Block a user