eww icon indicating copy to clipboard operation
eww copied to clipboard

[FEATURE] Support symlink on default config path

Open VuiMuich opened this issue 4 years ago • 1 comments

Description of the requested feature

I put a symlink at ~/.config/eww pointing to a subdirectory of my leftwm theme at ~/.config/leftwm/themes/current/eww. Basically eww is running fine but in the logs it complains about:

2021-08-20T15:50:08.305Z ERROR eww::error_handling_ctx > Failed to initialize eww paths

Caused by:
    Configuration directory /home/vuimuich/.config/eww does not exist

I didn't want to lable this a bug, as eww seems not broken in any way.

Proposed configuration syntax

Tbh I have not looked it up in the source, how eww is checking for the config folder, but maybe adding a std::fs::symlink_metadata.file_type().is_symlink() check along a fs::read_link() might help here?

VuiMuich avatar Aug 25 '21 21:08 VuiMuich

It works for me:

$ ls -l eww
lrwxrwxrwx 1 nix users 4 Aug 30 10:39 eww -> eww2

and:

cargo r -- daemon
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
     Running `target/debug/eww daemon`
 2021-08-30T16:44:53.192Z INFO  eww > Initializing Eww server. (/run/user/1000/eww-server_L2hvbWUvbml4Ly5jb25maWcvZXd3Mg==)
Run `target/debug/eww logs` to see any errors while editing your configuration.
 2021-08-30T16:44:53.192Z INFO  eww::server > Loading paths: config-dir: /home/nix/.config/eww2, ipc-socket: /run/user/1000/eww-server_L2hvbWUvbml4Ly5jb25maWcvZXd3Mg==, log-file: /home/nix/.cache/eww_L2hvbWUvbml4Ly5jb25maWcvZXd3Mg==.log

When I open a window, it works. And there are no errors in the log

legendofmiracles avatar Aug 30 '21 16:08 legendofmiracles

I'll close this, as I too cannot reproduce the issue here

elkowar avatar Aug 29 '22 11:08 elkowar

Can confirm it works for me now as well. Maybe it was something fixed in an dependency meanwhile.

Anyhow, sorry for forgetting this was still open.

VuiMuich avatar Aug 30 '22 08:08 VuiMuich