this post was submitted on 05 Apr 2021
29 points (96.8% liked)

Linux

49740 readers
540 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
29
submitted 3 years ago* (last edited 3 years ago) by [email protected] to c/[email protected]
 

I'm looking to restructure my home folder. Have for a long time used the standard XDG user directory structure ($HOME/{Desktop,Documents,Downloads...}) and it has become a mess. Also the capitalized directory names are inconvenient for a multitude of reasons.

I'll have to set the XDG user variables accordingly.

Anyone gone through a process of reorganizing their home directory structure beyond the standard XDG user directory structure. Did you note any oddities refraining from mentioned standards?

Here's my initial idea:

$HOME
├── desktop
├── documents
│   ├── public
│   └── templates
├── downloads
├── media
│   ├── audio
│   │   ├── bleeps
│   │   └── music
│   ├── e-books
│   ├── graphics
│   │   ├── 3d
│   │   ├── raster
│   │   │   ├── palettes
│   │   │   └── wallpapers
│   │   ├── screenshots
│   │   └── vector
│   ├── photos
│   └── videos
├── sites
└── software
    ├── bin
    ├── games
    │   └── roms
    └── git
top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 7 points 3 years ago* (last edited 3 years ago) (1 children)

I changed my user-dirs.dirs file to this:

XDG_DESKTOP_DIR="$HOME/desktop"
XDG_DOWNLOAD_DIR="$HOME/dl"
XDG_TEMPLATES_DIR="$HOME/docs/xdg-templates"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/docs"
XDG_MUSIC_DIR="$HOME/media/music"
XDG_PICTURES_DIR="$HOME/media/pics"
XDG_VIDEOS_DIR="$HOME/media/vids"

If only every application supported base directories instead of putting a .{name} file in the home dir.

[–] [email protected] 1 points 3 years ago (1 children)

.{name} is best case scenario as far as I'm concerned. Plenty of apps will default to $HOME/{name}.

That kind of crap should be marked as malware or something

[–] [email protected] 4 points 3 years ago

Honestly. If it doesn't support even an env variable to change it's folder, I usually just uninstall it

[–] [email protected] 4 points 3 years ago (1 children)

You can see my setup here: https://blog.cron.world/article_03.html#media-and-folders

Basically I have ~/app, ~/bin and alike and symlink everything (like ~/.appname) to ~/app/dat/appname. This works pretty well since 99% of the apps don't care if its a symlink or real folder. Sadly, there are a few apps that break, I use mounts as a workaround for them (but I'm still looking for alternatives).

[–] [email protected] 2 points 3 years ago (1 children)

Very nice writeup on your setup! Thanks for sharing, I'll dive deeper into it tonight.

[–] [email protected] 1 points 3 years ago

Thanks! I always planned to do a more in-depth post about it but time is passing by so fast.

[–] [email protected] 4 points 3 years ago (1 children)

I named my downloads folder dl. The rest of my home directory is quite messy.

[–] [email protected] 4 points 3 years ago* (last edited 3 years ago)

It's not a bad idea to do that. Something that urks my lazyness is when I go cd Do [tab] and fish promptly gives me the option to chose either Documents or Downloads.

Maybe in my case where I'd rather not mix abbreviations I'll remap my muscle memory from Downloads to fetched or something like that in order to avoid the do in downloads and documents.

[–] [email protected] 3 points 3 years ago

I basically don't like apps messing in my folders anyways so I don't worry about it too much. I leave the defaults but the only XDG defined folder I really use is Downloads but I basically use that folder for any temporary data.

Other than that I will symlink the configs of certain apps that I care about (git, zsh, vim, ...) into a good place for me and I keep most of my work in ~/p which is basically a directory of git repos.

So basically I find the XDG stuff mostly useless so I keep the stuff I care about out of those folders.

(Although I do wish more apps respected XDG_CONFIG_DIR rather than dumping crap into my home directory. )

[–] [email protected] 3 points 3 years ago (2 children)

I really like the default structure, the 0nly thing that bothers me is that now that I have a second HDD I can't share that structure between the tw0 discs, so now I am unsure on how to use my second HDD. I think I'll use the sec0nd for films that I don't care ab0ut keeping after seeding.

The 0nly thing I can say about your structure is that I w0uldn't use it because I need a Picture folder, because I download a lot of them and they aren't photos.

[–] [email protected] 4 points 3 years ago

I do this, using symlinks. So my ~/Videos, Pictures , etc point to syncthing folders on my external HDs.

[–] [email protected] 2 points 3 years ago

If you don't want to treat the second hard drive as separate. You might consider https://github.com/trapexit/mergerfs or alternatives to create a virtual union drive.