You are not logged in.

#1 2006-07-08 19:55:20

tomfitzyuk
Member
Registered: 2005-12-30
Posts: 89

What solutions are there to 'ls -a ~' looking so ugly?

Hey,

Don't you just hate it when you:

ls -a ~

only to find about 100 configuration files.

Wouldn't it be so much nicer and organised if the configuration files where in a configuration directory such as ~/.config

Some programs do put their config files into ~/.config (I know Openbox and Rox do, at least) but for those programs that don't (and won't), is there anyway that config files could be placed in ~/.config and still be able to be read by their programs.

One solution would be to create some sort of global symlink:

ln -s ~/.config/* ~/*

Of course, this code wouldn't work but I think you get the idea.

Another solution would be to create something similar to the module, mod_rewrite that Apache has, which is pretty much the same as first solution. Would this just be a case of writing a kernel module to check every read/write operation, and redirect any going to ~/.* to ~/.config/* ?

I say *just* a kernel module, but I couldn't write one tongue

Any ideas/suggestions?
Tom

Offline

#2 2006-07-08 23:11:19

McQueen
Member
From: Arizona
Registered: 2006-03-20
Posts: 387

Re: What solutions are there to 'ls -a ~' looking so ugly?

tomfitzyuk wrote:

Don't you just hate it when you:

ls -a ~

only to find about 100 configuration files.

Drop the -a

$ ls

No more configuration files. smile


/path/to/Truth

Offline

#3 2006-07-08 23:41:01

Chris|MD
Member
Registered: 2006-03-14
Posts: 36

Re: What solutions are there to 'ls -a ~' looking so ugly?

Change PKGBUILD of every Package which drops configs in home and recompile them. Voila.
I think 99% of all Apps allow changing the configpath.

I dont like it either.

Offline

#4 2006-07-09 00:00:56

tomfitzyuk
Member
Registered: 2005-12-30
Posts: 89

Re: What solutions are there to 'ls -a ~' looking so ugly?

I know I could drop the -a and then I wouldn't see them all. Maybe it's just me I don't like having non-directory files in ~. I *could* rebuild all the packages that put config files in ~ but that probably isn't worth it.

Offline

#5 2006-07-09 00:54:28

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: What solutions are there to 'ls -a ~' looking so ugly?

The ideal solution is to file bug reports with any apps that don't put their config files in .config (a la the freedesktop standard) so that the changes are upstream. But there's obviously no guarantee that devs will make the change, and it won't be instantaneous.


I am a gated community.

Offline

#6 2006-07-09 01:20:51

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: What solutions are there to 'ls -a ~' looking so ugly?

I actually have all my config files in a separate drive and symlink to them. If I ever have to re-intsall ( and I had over the years a couple of times) it is a snap to have all my programs and configs up and running.
It's not that hard to do, although, I agree that it would be nicer if it was some sort of automatic process for it  smile

Offline

#7 2006-07-12 17:01:13

palandir
Member
Registered: 2006-05-14
Posts: 73

Re: What solutions are there to 'ls -a ~' looking so ugly?

Since dot files are always supposed to be configuration files or directories containing configuration files, I don't see a problem there... if you want to see only them, type "ls -ad .[^.]*" or make an alias for that, and if you want to see only normal files/directories (what you want usually), type "ls"...

Offline

#8 2006-07-12 17:30:53

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: What solutions are there to 'ls -a ~' looking so ugly?

didn't know ls supported regex..


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#9 2006-07-12 17:42:16

palandir
Member
Registered: 2006-05-14
Posts: 73

Re: What solutions are there to 'ls -a ~' looking so ugly?

Bash does that, not ls, and it's not a real regex handling, just cool enough pattern matching. smile

Offline

#10 2006-07-12 18:00:26

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: What solutions are there to 'ls -a ~' looking so ugly?

palandir wrote:

Bash does that, not ls, and it's not a real regex handling, just cool enough pattern matching. smile

It uses the POSIX fnmatch() function, if you're curious at all.

Offline

#11 2006-07-13 01:14:32

palandir
Member
Registered: 2006-05-14
Posts: 73

Re: What solutions are there to 'ls -a ~' looking so ugly?

Not really, but more information is always good. smile

Offline

#12 2006-07-13 17:31:14

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 464

Re: What solutions are there to 'ls -a ~' looking so ugly?

tomfitzyuk, what exactly are you tryna do?

you mention wanting to see "all" but not .hiddenconfigfiles 

apart from .hiddenconfigfiles and .hiddendirectories what else have you in ~homedir?

are you actually trying to exclude .hiddenconfigfiles or .hiddendirs from your ls -a or just objecting to the fact they conf's are stored in your home dir?

maybe try

ls -aF |grep /     

for just showing dir's hidden or otherwise

kernel modules :  sledgehammer v walnut ?

Offline

#13 2006-07-13 20:55:51

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: What solutions are there to 'ls -a ~' looking so ugly?

Kern wrote:

apart from .hiddenconfigfiles and .hiddendirectories what else have you in ~homedir?

.hiddenporndir? wink

Offline

Board footer

Powered by FluxBB