tuiweather 0.3.7 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -12
- package/dist/index.js +735 -289
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -30,7 +30,20 @@ or with the Bun package manager:
|
|
|
30
30
|
bun install --global tuiweather
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
or run without installing:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npx tuiweather --version
|
|
37
|
+
bunx tuiweather --version
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Standalone binaries for macOS, Linux, and Windows (x64) are attached to each [GitHub release](https://github.com/brndnsh-labs/tuiweather/releases). On Windows (no Node or Bun required), in cmd.exe or any shell with `curl.exe` on PATH:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
curl.exe -Lo tuiweather-windows-x64.tar.gz https://github.com/brndnsh-labs/tuiweather/releases/latest/download/tuiweather-windows-x64.tar.gz
|
|
44
|
+
tar -xzf tuiweather-windows-x64.tar.gz
|
|
45
|
+
.\tuiweather.exe --version
|
|
46
|
+
```
|
|
34
47
|
|
|
35
48
|
### macOS Gatekeeper
|
|
36
49
|
|
|
@@ -45,8 +58,9 @@ xattr -d com.apple.quarantine /path/to/tuiweather
|
|
|
45
58
|
Run `tuiweather` with no arguments for the full TUI.
|
|
46
59
|
|
|
47
60
|
On the first run, tuiweather opens a short keyboard tour, asks for metric or imperial units, and
|
|
48
|
-
lets you search for your first location.
|
|
49
|
-
|
|
61
|
+
lets you search for your first location. Press `s` on the welcome step to skip for now and see the
|
|
62
|
+
empty main view, or `o` from the help overlay to re-run setup later. The completed setup is written
|
|
63
|
+
atomically to the normal config path before weather data loads.
|
|
50
64
|
|
|
51
65
|
Use `tuiweather --help` for command-line options and `tuiweather --version` to print the installed version.
|
|
52
66
|
|
|
@@ -65,7 +79,8 @@ Use `tuiweather --help` for command-line options and `tuiweather --version` to p
|
|
|
65
79
|
| `J` / `K` | Move focused location down/up in sidebar order (lg tier) |
|
|
66
80
|
| `↑` / `↓` | Scroll the main panel when content overflows |
|
|
67
81
|
| `?` | Toggle help overlay |
|
|
68
|
-
| `
|
|
82
|
+
| `o` | Re-run setup (from help overlay) |
|
|
83
|
+
| `esc` | Clear sidebar focus if set; otherwise close the help overlay |
|
|
69
84
|
| `q` | Quit |
|
|
70
85
|
|
|
71
86
|
While the search overlay is open it owns the keyboard: type to search, up/down to move the cursor, enter to add the highlighted result, esc to cancel. Number, focus, and reorder keys are ignored while the search input is focused (same as `d`/`r`).
|
|
@@ -127,10 +142,11 @@ bell. The bell depends on the minute-level nowcast, which is Open-Meteo only: un
|
|
|
127
142
|
Config lives at `~/.config/tuiweather/config.toml` (respects `XDG_CONFIG_HOME`). Every field is optional unless marked required; unknown fields are ignored.
|
|
128
143
|
|
|
129
144
|
```toml
|
|
130
|
-
schema_version =
|
|
145
|
+
schema_version = 4
|
|
131
146
|
time_format = "auto"
|
|
132
147
|
refresh_minutes = 10
|
|
133
148
|
theme = "auto"
|
|
149
|
+
ink = "auto"
|
|
134
150
|
provider = "openmeteo"
|
|
135
151
|
daily_days = 7
|
|
136
152
|
hourly_hours = 24
|
|
@@ -157,24 +173,26 @@ longitude = -122.6765
|
|
|
157
173
|
|
|
158
174
|
| Field | Type | Default | Constraints |
|
|
159
175
|
| --- | --- | --- | --- |
|
|
160
|
-
| `schema_version` | integer | `
|
|
176
|
+
| `schema_version` | integer | `4` | Required; currently always `4`. Version 1, 2, and 3 files are migrated in place on load |
|
|
161
177
|
| `time_format` | `12h` / `24h` / `auto` | `"auto"` | `auto` picks 12h when temperature units are imperial, else 24h |
|
|
162
178
|
| `refresh_minutes` | integer | `10` | Minimum `1` |
|
|
163
|
-
| `
|
|
179
|
+
| `reduced_motion` | boolean | `false` | Replace the animated loading spinner with a static indicator |
|
|
180
|
+
| `theme` | `day` / `night` / `auto` | `"auto"` | Accent palette; `auto` follows the location's sunrise/sunset. Text ink adapts via `ink` |
|
|
181
|
+
| `ink` | `auto` / `light` / `dark` | `"auto"` | Terminal ink override; `auto` detects the background via an OSC query (300ms timeout, fallback dark), `light`/`dark` skips detection and uses that ink directly |
|
|
164
182
|
| `provider` | `openmeteo` / `nws` | `"openmeteo"` | Weather data source. Open-Meteo is the default full-feature experience; NWS is the official US source fallback — works: conditions, temperatures, precipitation probabilities; goes quiet: minute-level nowcast (panel hides, watch bell inactive), hourly/daily precip amounts (blank bars/chips), air quality |
|
|
165
183
|
| `daily_days` | integer | `7` | `1`–`16` forecast days |
|
|
166
184
|
| `hourly_hours` | integer | `24` | `12`–`48` forecast hours |
|
|
167
185
|
| `default_location` | string | none | Must match a `[[locations]]` slug |
|
|
168
|
-
| `units.temp` | `metric` / `imperial` | legacy `units` | Display unit for temperatures |
|
|
169
|
-
| `units.wind` | `metric` / `imperial` | legacy `units` | Display unit for wind speed and visibility |
|
|
170
|
-
| `units.precip` | `metric` / `imperial` | legacy `units` | Display unit for precipitation amounts |
|
|
171
|
-
| `units.pressure` | `metric` / `imperial` | legacy `units` | Display unit for pressure; `metric` → hPa (rounded), `imperial` → inHg to 2 decimals;
|
|
186
|
+
| `units.temp` | `metric` / `imperial` | legacy `units`, else `imperial` | Display unit for temperatures |
|
|
187
|
+
| `units.wind` | `metric` / `imperial` | legacy `units`, else `imperial` | Display unit for wind speed and visibility |
|
|
188
|
+
| `units.precip` | `metric` / `imperial` | legacy `units`, else `imperial` | Display unit for precipitation amounts |
|
|
189
|
+
| `units.pressure` | `metric` / `imperial` | legacy `units`, else `imperial` | Display unit for pressure; `metric` → hPa (rounded), `imperial` → inHg to 2 decimals; falls back to `imperial` when unset |
|
|
172
190
|
| `panels.nowcast` | boolean | `true` | Show/hide the nowcast banner |
|
|
173
191
|
| `panels.details` | boolean | `true` | Show/hide the details grid |
|
|
174
192
|
| `panels.hourly` | boolean | `true` | Show/hide the hourly strip |
|
|
175
193
|
| `panels.daily` | boolean | `true` | Show/hide the daily list |
|
|
176
194
|
|
|
177
|
-
Each `[units]` field can be set independently, so mixed display such as °C temperatures with mph wind works everywhere including one-line mode. The legacy top-level `units = "metric" | "imperial"` scalar is still accepted and acts as the fallback for any `[units]` field you omit;
|
|
195
|
+
Each `[units]` field can be set independently, so mixed display such as °C temperatures with mph wind works everywhere including one-line mode. The legacy top-level `units = "metric" | "imperial"` scalar is still accepted and acts as the fallback for any `[units]` field you omit; when neither the field nor the legacy scalar is set, the unit falls back to `imperial`. Because TOML forbids a key and table with the same name, saved configs contain either the scalar (uniform prefs) or the full `[units]` table (mixed prefs), never both.
|
|
178
196
|
|
|
179
197
|
Each `[[locations]]` entry:
|
|
180
198
|
|