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

local export of XDG dirs #14

Open
orleanski opened this issue Mar 21, 2021 · 2 comments
Open

local export of XDG dirs #14

orleanski opened this issue Mar 21, 2021 · 2 comments

Comments

@orleanski
Copy link
Owner

dirs4xdg.sh

#!/bin/sh
test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && \
source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && \
#export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR XDG_SCREENSHOTS_DIR XDG_BACKGROUNDS_DIR XDG_PROJECTS_DIR
[ -d "${XDG_DESKTOP_DIR}:-$HOME/Desktop" ] || mkdir -p ${XDG_DESKTOP_DIR}
[ -d "${XDG_DOCUMENTS_DIR}:-$HOME/Documents" ] || mkdir -p ${XDG_DOCUMENTS_DIR}
[ -d "${XDG_TEMPLATES_DIR}:-$HOME/Documents/Templates" ] || mkdir -p ${XDG_TEMPLATES_DIR}
[ -d "${XDG_DOWNLOAD_DIR}:-$HOME/Downloads" ] || mkdir -p ${XDG_DOWNLOAD_DIR}
[ -d "${XDG_PUBLICSHARE_DIR}:-$HOME/Public" ] || mkdir -p ${XDG_PUBLICSHARE_DIR}
[ -d "${XDG_MUSIC_DIR}:-$HOME/Media/Music" ] || mkdir -p ${XDG_MUSIC_DIR}
[ -d "${XDG_VIDEOS_DIR}:-$HOME/Media/Videos" ] || mkdir -p ${XDG_VIDEOS_DIR}
[ -d "${XDG_PICTURES_DIR}:-$HOME/Media/Pictures" ] || mkdir -p ${XDG_PICTURES_DIR}
[ -d "${XDG_BACKGROUNDS_DIR}:-$HOME/Media/Picture/Backgrounds" ] || mkdir -p ${XDG_BACKGROUNDS_DIR}
[ -d "${XDG_SCREENSHOTS_DIR}:-$HOME/Media/Picture/Screenshots" ] || mkdir -p ${XDG_SCREENSHOTS_DIR}
[ -d "${XDG_PROJECTS_DIR}:-$HOME/Projects" ] || mkdir -p ${XDG_PROJECTS_DIR}

chmod 700 ${XDG_CACHE_HOME} ${XDG_CONFIG_HOME} ${XDG_DATA_HOME}
@orleanski
Copy link
Owner Author

XDG dirs are not extensible, so no background and no screenshot folders via XDG

@orleanski
Copy link
Owner Author

orleanski commented Mar 24, 2021

desired folder structure (WIP)
tree -dL 3

├── Desktop
├── Documents
│   └── Templates
├── Downloads
├── Media
│   ├── Book
│   ├── Music
│   ├── Pictures
│   │   ├── Backgrounds
│   │   └── Screenshots
│   └── Videos
├── Projects
└── Public

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