Skip to content
This repository

Keep your $HOME clean by finding old conf files

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 data
Octocat-spinner-32 src
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Setup.hs
Octocat-spinner-32 clean-home.cabal
README
WARNING: This project is at an early stage of development
and the database of packages/programs is nearly empty.
Thus, it will not work very well yet, but you can help
improve it.

This program scans your $HOME dir and checks each element
whose name begins with . (dot) against a database of know
configuration files. From that, it determines the program
(or the package name, if you use search-by-package) that
may need that file/dir, and checks whether that program is
installed in your system.

There are two ways of finding programs:
1) By program name: searches for the config filepath in a
DB of program names. If a program is found, it checks whether
that program exists with `which`.

2) By package name: searches for the config filepath in a
DB of package names. If a package is found, it checks whether
that package is installed with apt-get. This makes clean-home
dependent on Debian/Deb-based OSs. I'll work to get that
fixed. You can request that clean-home uses a different tool
by providing the name and args to be passed to that tool.
By default, an empty result is considered a fail and a non-empty
result is conceived as a match, but you can request to use
the exit code to determine whether packages are installed or
not.

Run clean-home --help to see the complete set of options that
clean-home accepts.

***

How to improve the results:

clean-home keeps two files in its data directory with the
config file - program/package correspondences. They can be
located in the program's share dir, under the names PkgList
and PrgList.

If you install this in your home, they will be in:
~/.cabal/share/clean-home-0.0.3/data/
(assuming that you have version 0.0.3 installed)

The only thing you have to do now is add more entries to
that file.

The format of this file is very simple: it's a haskell value of type
[ (String, [ String ]) ]

Add/remove/modify entries as you want to tweak it to your needs.
Once you got a decent configuration, make sure that you send
me the file, by email or pull request, so that I add your
entries to the next version of clean-home.

Thanks for taking part in this experiment and... go clean your $HOME!!!


Something went wrong with that request. Please try again.