9

My home directory got pretty messy recently.

Can I just move all the dotfiles and dotdirectories into ~/.config? (without creating symlinks)

Can I force newly installed software to put their configs into ~/.config?

  • ls doesn't show dotfiles by default. If you're using an alias for ls that includes -a, stop doing that except when you want it. (Of course, tab-completion still shows dotfiles as possible completions for mv foo.txt ~/<tab><tab>) – Peter Cordes Jan 1 '17 at 6:20
16

Short answer: no.

You can't move your dotfiles to ~/.config and expect programs to somehow infer that no dotfiles under ~ means they could be elsewhere.

Therefore, you ought to explicitly tell every program to look at ~/.config. (I guess in most cases this is done by setting some environment variable.)

Even then, many programs don't even envision such a possibility; so you'd still have some dotfile under ~.

  • so you say, if I find the relevant environment variables, I could at least put the config files those in a seperate folder? – user430 Dec 31 '16 at 17:59
  • In theory, yes. In my experience, no command allows that for customization files. They always use one of a set of predefined files, in some order of preference. Unfortunately, only a minority use ~./config. As regards the "guess" in my answer, it was just a speculative digression. – giucal Dec 31 '16 at 22:32
9

No you can't move ~/.* to ~/.config

Most files and directories beginning with . in the top level home directory (/home/$USER) are controlled by applications doing things on your behalf.

Folders within such as .../Documents, .../Pictures, .../Downloads, etc. are almost always your exclusive domain. The best practice is to never put your own files into /home/$USER(~). Then you aren't inconvenienced by searching through all the . files and directories that you don't control.

Using the good ship Nautilus to navigate troubled waters

I'm a self-confessed CLF (Command Line Freak) dating back to IBM PC-DOS days. After a few years though I've come to admire the efficiency and power of Nautilus.

Within the Nautilus file manager you can hide these files and directories from your eyes. Go to the top bar Files menu and select Edit then Preferences and unset the option on this screen:

Nautilus hide system files

In answering this question I did the above myself and instantly the main Nautilus window repainted. To my surprise I discovered a dozen of my own files that had been hidden within all the system files. I moved them to appropriate sub-directories or deleted them.

Nautilus hot key / keyboard shortcut

Press Ctrl+H to toggle hidden files / directories viewing on and off. This doesn't change the permanent settings described in the previous section. It only lasts for your current session but saves you the inconvenience of changing the configuration for one time views.

Many thanks to commentators below (@videonauth and @utf-8) for providing information on this section.

  • 1
    same hiding/unhiding can be achieved with ctrl+h :) – Videonauth Dec 31 '16 at 16:45
  • @Videonauth thanks for that short cut key ! You made the rest of my year :) – WinEunuuchs2Unix Dec 31 '16 at 16:47
  • 1
    You're welcome was the last action for me THIS year, see you all when I'm sober again :p – Videonauth Dec 31 '16 at 16:55
  • 4
    There is an important difference between Ctrl+H and changing it in the settings: It's only permanent if you change it in the settings. – UTF-8 Dec 31 '16 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.