You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add window state persistence and start_minimized option
- Window position, size, and maximized state saved to <exe>.window.json
and restored on next launch
- New config option start_minimized: "on" or "off"
- Updated README with new features documentation
- Added *.window.json to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ A lightweight [Tauri v2](https://v2.tauri.app/) desktop app that wraps any websi
9
9
-**Custom title** — Optionally set a fixed window title via config
10
10
-**Custom icon** — Set your own window icon (ICO or PNG)
11
11
-**Dark mode control** — Request dark/light theme from sites, or force-dark all sites (Windows)
12
+
-**Remember window position** — Window size, position, and maximized state are saved and restored across sessions
13
+
-**Start minimized** — Optionally launch the app minimized to the taskbar
12
14
-**Rename-to-configure** — Rename the executable and it auto-detects its config file (`MyApp.exe` → `MyApp.json`)
13
15
-**Cross-platform** — Builds for Windows x64, Linux x64, and macOS ARM64
14
16
@@ -44,6 +46,7 @@ The config file is a simple JSON file placed next to the executable. The filenam
44
46
|`icon`| No |`""`| Path to a custom window icon (`.ico` or `.png`). Absolute path, or relative to the executable |
45
47
|`prefer_dark_mode`| No |`"default"`| Color scheme preference: `"default"` (let OS decide), `"dark"` (request dark theme), `"light"` (request light theme). Only affects sites that support `prefers-color-scheme` CSS. Windows only |
46
48
|`force_dark_mode`| No |`"off"`| Force-dark rendering: `"on"` or `"off"`. When `"on"`, forces all sites into dark mode even if they don't natively support it — same as Chrome's force-dark flag. Windows only |
49
+
|`start_minimized`| No |`"off"`| Start minimized to taskbar: `"on"` or `"off"`|
47
50
48
51
### Example — minimal
49
52
@@ -61,7 +64,8 @@ The config file is a simple JSON file placed next to the executable. The filenam
61
64
"title": "YouTube Music",
62
65
"icon": "music.png",
63
66
"prefer_dark_mode": "dark",
64
-
"force_dark_mode": "off"
67
+
"force_dark_mode": "off",
68
+
"start_minimized": "off"
65
69
}
66
70
```
67
71
@@ -73,6 +77,15 @@ The config file is a simple JSON file placed next to the executable. The filenam
73
77
74
78
The two options can be combined: `prefer_dark_mode` handles CSS-aware sites gracefully, while `force_dark_mode` catches everything else.
75
79
80
+
### Window state persistence
81
+
82
+
The app automatically remembers your window position, size, and maximized state between sessions. This works out of the box — no configuration needed.
83
+
84
+
- The state is saved to `<exe_name>.window.json` beside the executable (e.g. `app.window.json`)
85
+
- Updated every time you move, resize, or maximize/restore the window
86
+
- On next launch, the window opens exactly where you left it
87
+
- To reset to defaults, simply delete the `.window.json` file
88
+
76
89
## Platform Notes
77
90
78
91
| Platform | Runtime Requirement |
@@ -115,7 +128,7 @@ The binary will be at `src-tauri/target/release/app` (or `app.exe` on Windows).
115
128
├── tauri.conf.json # Tauri build config
116
129
└── src/
117
130
├── main.rs # Entry point
118
-
├── lib.rs # App setup, navigation, title sync, dark mode
131
+
├── lib.rs # App setup, navigation, title sync, dark mode, window state
Copy file name to clipboardExpand all lines: app.json
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,5 +12,8 @@
12
12
"prefer_dark_mode": "default",
13
13
14
14
"_comment_force_dark_mode": "Optional. Values: 'on' or 'off'. When 'on', forces all sites into dark mode even if they don't natively support it (like Chrome's force-dark flag). Windows only.",
15
-
"force_dark_mode": "off"
15
+
"force_dark_mode": "off",
16
+
17
+
"_comment_start_minimized": "Optional. Values: 'on' or 'off'. When 'on', the app starts minimized to the taskbar.",
0 commit comments