Wave Global Background
Use this skill to inspect or update Wave's global tab background configuration with minimal, reversible edits.
Workflow
- Inspect the current files under
~/.config/waveterm/:settings.jsonbackgrounds.jsonpresets/bg.json
- Reuse an existing preset when possible. Create a new preset only when the user wants a different image or key.
- Run
scripts/update_wave_background.pyto make the change and create timestamped backups. - Re-read the touched JSON files to verify the result.
- Tell the user that
tab:presetcontrols the global default for new tabs; existing tabs may need reapplying the preset or restarting Wave.
Preferred command
Run the helper from the skill directory.
python3 scripts/update_wave_background.py \
--preset bg@cloud \
--opacity 0.6 \
--set-global
Common variants
Set a new image and make it global:
python3 scripts/update_wave_background.py \
--preset bg@cloud \
--display-name 云彩壁纸 \
--image ~/Downloads/wavebackground.png \
--opacity 0.6 \
--set-global
Use raw CSS background instead of an image path:
python3 scripts/update_wave_background.py \
--preset bg@aurora \
--display-name 极光 \
--bg "linear-gradient(180deg, #0f172a 0%, #1d4ed8 100%)" \
--opacity 0.55 \
--set-global
Preview changes without writing files:
python3 scripts/update_wave_background.py --preset bg@cloud --opacity 0.55 --dry-run
Rules
- Prefer local image files over remote URLs.
- Use absolute paths in the generated
bgCSS.~is okay on input; resolve it before writing. - Keep
bg:*: trueon background presets so old per-tab background keys do not leak through. - Mirror the preset into both
backgrounds.jsonandpresets/bg.jsonfor compatibility with Wave's preset loading and migrated setups. - If the preset already exists and the user only asked for opacity/global changes, do not rewrite unrelated fields.
- Always report touched files and backup paths.