Remove obsolete weather status poller (#6555)
This commit is contained in:
@@ -70,7 +70,6 @@ BarWidget {
|
||||
bar: root.bar
|
||||
text: panelLoader.item ? panelLoader.item.label : ""
|
||||
slotSize: Style.bar.statusSlot
|
||||
active: panelLoader.item && panelLoader.item.klass === "active"
|
||||
// Tooltip suppressed because the panel is the detail view.
|
||||
tooltipText: ""
|
||||
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
function parseWeatherStatus(raw) {
|
||||
try {
|
||||
var data = JSON.parse(String(raw || "{}"))
|
||||
return {
|
||||
label: data.text || "",
|
||||
klass: data.class || ""
|
||||
}
|
||||
} catch (e) {
|
||||
return { label: "", klass: "" }
|
||||
}
|
||||
}
|
||||
|
||||
// weather.json holds {"name": ..., "latitude": ..., "longitude": ...} (see
|
||||
// omarchy-weather-location, which owns the format). Missing, blank, or
|
||||
// unparseable means the location is auto-detected from the IP address.
|
||||
@@ -279,7 +267,6 @@ function iconForCode(code, night) {
|
||||
|
||||
if (typeof module !== "undefined") {
|
||||
module.exports = {
|
||||
parseWeatherStatus: parseWeatherStatus,
|
||||
parseLocationFile: parseLocationFile,
|
||||
wttrLocationQuery: wttrLocationQuery,
|
||||
parseGeocodingResults: parseGeocodingResults,
|
||||
|
||||
@@ -11,7 +11,6 @@ Panel {
|
||||
ipcTarget: "omarchy.weather"
|
||||
manageIpc: false
|
||||
|
||||
property string omarchyPath: Quickshell.env("OMARCHY_PATH")
|
||||
property var anchorItem: null
|
||||
property bool openedFromHotkey: false
|
||||
|
||||
@@ -126,7 +125,6 @@ Panel {
|
||||
|
||||
// Shared hero/bar icon state, updated with each successful weather response.
|
||||
property string label: ""
|
||||
property string klass: ""
|
||||
|
||||
// wttr's current conditions when available; open-meteo's (bundled with the
|
||||
// much faster daily forecast fetch) fill the hero while wttr is in flight.
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
icon=$(omarchy-weather-icon 2>/dev/null)
|
||||
|
||||
if [[ -n $icon ]]; then
|
||||
icon=$(printf '%s' "$icon" | sed 's/["\\]/\\&/g')
|
||||
printf '{"text":"%s"}\n' "$icon"
|
||||
else
|
||||
printf '{"text":"","class":"unavailable"}\n'
|
||||
fi
|
||||
Reference in New Issue
Block a user