Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default values for $XDG_DOWNLOAD_DIR and such #50

Open
netzego opened this issue Jun 15, 2023 · 0 comments
Open

Add default values for $XDG_DOWNLOAD_DIR and such #50

netzego opened this issue Jun 15, 2023 · 0 comments

Comments

@netzego
Copy link

netzego commented Jun 15, 2023

Correct me if i am wrong. The standard for an unset/not exported variable eg. $XDG_DOWNLOAD_DIR should default to $HOME. See: https://www.freedesktop.org/wiki/Software/xdg-user-dirs/.

Here is a shellscript example of how to find the desktop and the download directory:
test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
echo ${XDG_DESKTOP_DIR:-$HOME/Desktop}
echo ${XDG_DOWNLOAD_DIR:-$HOME}

I suggest to implement this behavior as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant