wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Cube plugin is unable to use the ~ in the file specification

Open HarrisonFld opened this issue 9 months ago • 1 comments

Describe the bug Whenever I use the cube plugin and I try to specify an image file that is located in one of my user directories for the skydome_texture config option, I get a green skydome, which I assume means the file was not found. I'm unsure if this problem is specific to just the cube plugin or to the entire Wayfire project, but I assume that the ~ shorthand, that's used for the user's home directory just doesn't work. Or is there just some alternative to the ~ that is used in the config?

tilda version skydome_texture = ~/Documents/test.png <- this results in the green skydome (the file path is correct)

absolute path version: skydome_texture = /home/harrisonfld/Documents/test.png <- this results in the correct skydome

Steps to reproduce the behavior:

  1. Add the cube plugin to the ~/.config/wayfire.ini
  2. Under the cube config heading specify:
[cube]
background_mode = skydome
skydome_texture = ~/someskydome.png
# replace someskydome.png with your actual test skydome

  1. Use Wayfire, and try to use the cube view, should get a green skydome

Expected behavior Skydome should just load, and the tilda should auto-expand into the user's home directory path.

Screenshots or stacktrace ~ version: Image absolute path version: Image

Wayfire version Installed from the chaotic AUR repo on Arch Linux wayfire -v: 0.9.0-unknown (Jan 19 2025) branch unknown

HarrisonFld avatar Mar 29 '25 19:03 HarrisonFld

We allow absolute paths only for now. We'd need to use shell expansion before loading the file to have it work with the home directory, if you or someone wants to, feel free to submit a PR for the relevant places in the code.

ammen99 avatar Mar 29 '25 19:03 ammen99