Skip to content

[Bug]: Relative paths for background images does not function as expected #2237

@Printoiid

Description

@Printoiid

Current Behavior

When defining a background image in any preset, it's impossible to use a relative path when referencing a JPG image.

EG
Is valid:

...
     "bg": "url('~/.config/waveterm/presets/picture.jpg')"
...

Is not valid:
(assuming the PWD is in the /presets directory.)

...
     "bg": "url('./picture.jpg')"
...

Expected Behavior

Relative pathing from the /presets directory in ~/.config/waveterm/presets/ work, otherwise default to full defined path.

Steps To Reproduce

  1. Create a new configuration in ~/.config/waveterm/presets on Linux.
  2. Create a relative path with some image in a preset configuration. (See current behavior)
  3. Attempt to change your background for the tab as that newly created preset configuration.

Wave Version

0.11.3

Platform

Linux

OS Version/Distribution

Mint 22.1

Architecture

arm64

Anything else?

No response

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions