From 38bab29776950ac2364ed64195b89887717c33de Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 1 Jan 1970 03:00:00 +0300 Subject: chore: init --- profile/.profile.d/10_xdg.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 profile/.profile.d/10_xdg.sh (limited to 'profile/.profile.d/10_xdg.sh') diff --git a/profile/.profile.d/10_xdg.sh b/profile/.profile.d/10_xdg.sh new file mode 100644 index 0000000..8a7cebe --- /dev/null +++ b/profile/.profile.d/10_xdg.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +_local="${HOME}/.local" + +export XDG_CACHE_HOME="${_local}/var/cache" +export XDG_CONFIG_HOME="${_local}/etc" +export XDG_DATA_HOME="${_local}/var/lib" +export XDG_DESKTOP_DIR="${HOME}/tmp" +export XDG_DOCUMENTS_DIR="${HOME}/doc" +export XDG_DOWNLOAD_DIR="${HOME}/tmp" +export XDG_MUSIC_DIR="${HOME}/music" +export XDG_PICTURES_DIR="${HOME}/tmp" +export XDG_PUBLICSHARE_DIR="${HOME}/tmp" +export XDG_RUNTIME_DIR="${_local}/var/run" +export XDG_TEMPLATES_DIR="${HOME}/tmp" +export XDG_VIDEOS_DIR="${HOME}/tmp" + +unset _local + +_xdg_dirs=" +${XDG_CACHE_HOME} +${XDG_CONFIG_HOME} +${XDG_DATA_HOME} +${XDG_DESKTOP_DIR} +${XDG_DOCUMENTS_DIR} +${XDG_DOWNLOAD_DIR} +${XDG_MUSIC_DIR} +${XDG_PICTURES_DIR} +${XDG_PUBLICSHARE_DIR} +${XDG_RUNTIME_DIR} +${XDG_TEMPLATES_DIR} +${XDG_VIDEOS_DIR} +" + +for _xdg_dir in ${_xdg_dirs}; do + [ ! -d "${_xdg_dir}" ] && mkdir -p "${_xdg_dir}" +done + +unset _xdg_dir _xdg_dirs -- cgit 1.4.1