My home dir looks like this.
$ ls -1F
TODO
bin@
desk/
docs/
dots/
g/
git/
go/
music/
pics/
tmp/
vids/
vm/
Turns out you can rename all that shit, but it's not quite as simple as firing
off a few mv
commands.
Every decently written program designed to run on UNIX/Linux conforms, at least in part, to the freedesktop standards. (Although Steam is a notable and very annoying exception.) Among other things, this standard specifies locations which store different types of data such as "config files," "cache," and even things like your download and picture folders.
Since there are libraries written in nearly every popular language, this makes it really easy for developers to know where you want stuff without every program needing to independently ask you, or worse, guess.
As a user, we can configure these values to our liking. Some are just
environment variables (stored either in your shell's config or .profile
). The
major ones are XDG_CONFIG_HOME
, XDG_CACHE_HOME
, and XDG_DATA_HOME
.
However, the ones you probably care about, which a file manager has the little
icons for, are all stored in a file called user-dirs.dirs
. That file is, of
course located where all config files should be in XDG_CONFIG_HOME
, which by
default is just .config
in your home directory.
~/home/.config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/desk"
XDG_DOWNLOAD_DIR="$HOME/tmp"
XDG_TEMPLATES_DIR="$HOME/docs/templates"
XDG_PUBLICSHARE_DIR="$HOME/docs/share"
XDG_DOCUMENTS_DIR="$HOME/docs"
XDG_MUSIC_DIR="$HOME/music"
XDG_PICTURES_DIR="$HOME/pics"
XDG_VIDEOS_DIR="$HOME/vids"
Also henry wrote a posix shell script to automatically create the user-dirs.dirs file and create the directories:
#!/bin/sh
BASEDIR="$HOME"
DESKTOP="desk"
DOWNLOAD="down"
TEMPLATES="temps"
PUBLICSHARE="share"
DOCUMENTS="docs"
MUSIC="music"
PICTURES="pics"
VIDEOS="vids"
mkdir "$BASEDIR/$DESKTOP" "$BASEDIR/$DOWNLOAD" "$BASEDIR/$TEMPLATES" "$BASEDIR/$PUBLICSHARE" "$BASEDIR/$DOCUMENTS" "$BASEDIR/$MUSIC" "$BASEDIR/$PICTURES" "$BASEDIR/$VIDEOS"
xdg-user-dirs-update --force --set "DESKTOP" "$BASEDIR/$DESKTOP"
xdg-user-dirs-update --force --set "DOWNLOAD" "$BASEDIR/$DOWNLOAD"
xdg-user-dirs-update --force --set "TEMPLATES" "$BASEDIR/$TEMPLATES"
xdg-user-dirs-update --force --set "PUBLICSHARE" "$BASEDIR/$PUBLICSHARE"
xdg-user-dirs-update --force --set "DOCUMENTS" "$BASEDIR/$DOCUMENTS"
xdg-user-dirs-update --force --set "MUSIC" "$BASEDIR/$MUSIC"
xdg-user-dirs-update --force --set "PICTURES" "$BASEDIR/$PICTURES"
xdg-user-dirs-update --force --set "VIDEOS" "$BASEDIR/$VIDEOS"