DEV Community

Euber Alexandre Barbosa
Euber Alexandre Barbosa

Posted on

Dut, yet another simple dotfile manager!

Dotfiles, as implied by its nickname, are files named prepended with a dot, that configure software initial settings and usually resides hidden on $HOME directories.

Users craft their dotfiles through the years with a such a care that them can easily be the most sensible and essential files in their system, version-controlling is a must, of course.

There is even a culture of proudly publicly sharing dotfiles, and that’s a good way to grab some cool snippets.

We all love how frugal and simple to use are the Linux tools as find, grep or ls, so I kept that in mind on cooking up Dut.

Dut creates links of all files in the target directory, perfectly mirroring them in the destination directory, $HOME by default:

dut --from /data/dotfile_folder --create

Of course you can just try it out first:

dut --from /data/dotfile_folder --pretend

To remove all linked files, it goes as:

dut -f /data/dotfile_folder --remove

It goes as easy to set a different destination:

dut -f /data/bin --to ~/.local/bin --create

We don’t want that just every file to be linked, eg: LICENSE. For those files, you can pin out their location by feeding the .dutignore, that follows docker’s .dockerignore.

Conflicting files found at the destination directory are moved up to $HOME/.backup.

And that is it.

For more information, check the README.md in the main repository, or the --help option.

PS: In case you are wondering what’s with all those main.* files, as I pick a new language to learn, Dut is a good initial project as it offers a good set of challenges.

But I reckon that only the Ruby, Guile and PHP versions are fully functional.

With that said, pick your poison! :)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

The discussion has been locked. New comments can't be added.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs