Set up XDG desktop dirs under data/
This commit is contained in:
parent
55e59ff1a2
commit
52ca81ba1c
3 changed files with 29 additions and 4 deletions
|
@ -44,11 +44,24 @@ export POWERSHELL_TELEMETRY_OPTOUT=1
|
|||
export PYTHONWARNINGS=ignore::UserWarning
|
||||
export VIRSH_DEFAULT_CONNECT_URI=qemu:///session
|
||||
|
||||
if [ -d /var/acp ] && ! [ -L /var/acp ]
|
||||
if ! [ -x "$HOME/data" ]
|
||||
then
|
||||
export ACP=/var/acp
|
||||
else
|
||||
export ACP="$HOME/data"
|
||||
install -d -m 0700 "$HOME/data"
|
||||
fi
|
||||
|
||||
if [ -r "$XDG_CONFIG_HOME/user-dirs.dirs" ]
|
||||
then
|
||||
(
|
||||
. "$XDG_CONFIG_HOME/user-dirs.dirs"
|
||||
mkdir -p $XDG_DESKTOP_DIR
|
||||
mkdir -p $XDG_DOCUMENTS_DIR
|
||||
mkdir -p $XDG_DOWNLOAD_DIR
|
||||
mkdir -p $XDG_MUSIC_DIR
|
||||
mkdir -p $XDG_PICTURES_DIR
|
||||
mkdir -p $XDG_PUBLICSHARE_DIR
|
||||
mkdir -p $XDG_TEMPLATES_DIR
|
||||
mkdir -p $XDG_VIDEOS_DIR
|
||||
)
|
||||
fi
|
||||
|
||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
||||
|
|
8
roles/home-cli/files/user-dirs.dirs
Normal file
8
roles/home-cli/files/user-dirs.dirs
Normal file
|
@ -0,0 +1,8 @@
|
|||
XDG_DESKTOP_DIR="$HOME/Desktop"
|
||||
XDG_DOCUMENTS_DIR="$HOME/data/Documents"
|
||||
XDG_DOWNLOAD_DIR="$HOME/Downloads"
|
||||
XDG_MUSIC_DIR="$HOME/data/Music"
|
||||
XDG_PICTURES_DIR="$HOME/data/Pictures"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/Public"
|
||||
XDG_TEMPLATES_DIR="$HOME/Templates"
|
||||
XDG_VIDEOS_DIR="$HOME/data/Videos"
|
|
@ -71,3 +71,7 @@
|
|||
src: virtinst.sh
|
||||
dest: "{{ ansible_env.HOME }}/.local/bin/virtinst"
|
||||
mode: '0755'
|
||||
- name: Create $XDG_CONFIG_HOME/user-dirs.dirs
|
||||
ansible.builtin.copy:
|
||||
src: user-dirs.dirs
|
||||
dest: "{{ ansible_env.XDG_CONFIG_HOME }}/user-dirs.dirs"
|
||||
|
|
Loading…
Reference in a new issue