Summary
Hi there! First of all, thank you for developing wayscriber. It is a great tool!
I ran into a similar issue as my previous #187 but for the toolbar UI this time.
After #189 fixed the drawing-related state (color, thickness, etc.) from rewriting the config file, I assumed the toolbar state would be handled the same way. But it looks like toolbar UI interactions are still triggering a full config rewrite. Every time I click the pin button on a toolbar, or minimize it, or hide a tool, my entire ~/.config/wayscriber/config.toml gets rewritten from scratch. All my comments get stripped and some of my values get reformatted... for example, my board backgrounds went from { rgb = [...] } to plain multi-line arrays.
Steps to Reproduce
-
In your config.toml, have a board entry with inline syntax like:
[[boards.items]]
id = "whiteboard"
background = { rgb = [0.992, 0.992, 0.992] }
-
Launch wayscriber and click the pin/unpin button on the top or side toolbar.
-
Check config.toml. The background line is now expanded to:
background = [
0.992,
0.992,
0.992,
]
Any comments you wrote in the file are gone too.
What Triggers It
I noticed the config file gets rewritten when I do any of these:
- Pin/unpin the top or side toolbar
- Minimize or reopen a toolbar
- Switch between panes (draw/canvas/session/settings) in the side toolbar
- Collapse or expand a section in the side palette
- Hide or show individual tool buttons
- Drag tools around to reorder them
- Reset toolbar item order
These feel like runtime interactions to me... the same way changing pen color while drawing is runtime state. I might pin and unpin the toolbar several times in a session, and each time it rewrites the whole config file.
Why This Matters
- Dotfiles management:
My config.toml is tracked in git. Every time I use a toolbar button, it shows up as a modified file. Running git diff is noisy with formatting changes I never made.
- Comments get nuked:
I write notes in my config file to remind myself what certain settings do. A full rewrite from the program deletes all of them.
Additional Context
This is basically the same issue as #187 but for the toolbar UI instead of drawing actions. I noticed that wayscriber already handles session state really well through the session files in ~/.local/share/wayscriber/. The fix in #189 moved drawing state out of the config persistence path and into runtime-only state. It seems like the same approach could apply here for toolbar pin/minimize, hiding tools, reordering, collapsed sections, and active pane selection... these all feel like runtime UI state that should not be baked into the static config file.
I am not sure which other actions also trigger a full save, but I observed that changing settings like keybindings, board config, click highlight preferences, and session resume from the tray icon also seem to rewrite the file. Not sure if that is intentional or not.
Thanks for considering this! Let me know if you need any more info or testing from my end.
Summary
Hi there! First of all, thank you for developing wayscriber. It is a great tool!
I ran into a similar issue as my previous #187 but for the toolbar UI this time.
After #189 fixed the drawing-related state (color, thickness, etc.) from rewriting the config file, I assumed the toolbar state would be handled the same way. But it looks like toolbar UI interactions are still triggering a full config rewrite. Every time I click the pin button on a toolbar, or minimize it, or hide a tool, my entire
~/.config/wayscriber/config.tomlgets rewritten from scratch. All my comments get stripped and some of my values get reformatted... for example, my board backgrounds went from{ rgb = [...] }to plain multi-line arrays.Steps to Reproduce
In your config.toml, have a board entry with inline syntax like:
Launch wayscriber and click the pin/unpin button on the top or side toolbar.
Check config.toml. The background line is now expanded to:
Any comments you wrote in the file are gone too.
What Triggers It
I noticed the config file gets rewritten when I do any of these:
These feel like runtime interactions to me... the same way changing pen color while drawing is runtime state. I might pin and unpin the toolbar several times in a session, and each time it rewrites the whole config file.
Why This Matters
My config.toml is tracked in git. Every time I use a toolbar button, it shows up as a modified file. Running
git diffis noisy with formatting changes I never made.I write notes in my config file to remind myself what certain settings do. A full rewrite from the program deletes all of them.
Additional Context
This is basically the same issue as #187 but for the toolbar UI instead of drawing actions. I noticed that wayscriber already handles session state really well through the session files in
~/.local/share/wayscriber/. The fix in #189 moved drawing state out of the config persistence path and into runtime-only state. It seems like the same approach could apply here for toolbar pin/minimize, hiding tools, reordering, collapsed sections, and active pane selection... these all feel like runtime UI state that should not be baked into the static config file.I am not sure which other actions also trigger a full save, but I observed that changing settings like keybindings, board config, click highlight preferences, and session resume from the tray icon also seem to rewrite the file. Not sure if that is intentional or not.
Thanks for considering this! Let me know if you need any more info or testing from my end.