Code Monkey home page Code Monkey logo

connect_the_dotfiles's Introduction

Connect The Dotfiles (CTD)

Disclaimer

This software is just a hobby project. I created it mainly for my own use because I wanted to be able to organize my dotfiles comfortably exactly the way I wish to. Also I like Nim. I did not reinvent the wheel in any way. Use this piece of software at your own risk.

If you do not read carefully before you type, you may mess up your system irreversibly.

This software does create symlinks on your machine and even, if wanted, delete files. Thus, think before you type. Even better: study the source code.

I am not responsible for any erased, deleted or not recoverable file in any way.

Functionality

  • Gather all your configuration files in a single directory
    • It is recommended to make that specific directory version controlled (e.g. Git)
  • Let CTD automatically create links at the needed location
  • If you set up a new system and already have certain configuration files, or other mandatory files, you may just let CTD create its directories, copy those files there and let CTD create links at their destined location. All you need to transfer from one system to another, assuming your dotfiles are in a repository, is the so called Storagefile, which indicates, where the symlinks should be created for each file. Since the Storagefile is just plain text, you can even write it yourself! So just import your repo into DotfileLocation and get started!

Installation

  • Install Nim (I recommend choosenim)
  • Clone this repository
  • Run nimble rr in the connect_the_dotfiles/ directory
  • This will create and run a binary in the bin/ directory
    • You can also run nimble r to create the binary without immediately running it
  • Start the binary or pass parameters to it (--help for usage guide)

Info

Relevant files & directories:

  • ~/.config/ctd/
  • ~/.config/ctd/data.txt
  • ~/.config/ctd/dotfiles/ (You want this to be a Git Repo)
  • ~/.config/ctd/backups/

OS Support

Since CTD is using symlinks and mechanics that do not really exist on Windows in this way it is aimed for Linux-based operating systems (I do not know enough about macOS to say anything about compatibility at this point).

It was explicitly tested on my home machine which runs Manjaro on Kernel version 5.4.169 on a Lenovo ThinkPad L480 right now.

Future [ Ideas | Directions | TODOs ]

  • Let user choose all relevant directory locations (ProgDir, DotfileDir, BackupDir, Storagefile)
  • Let user cleanup DotfilesLocation using Storagefile
  • Modularize the project away from a single monolith file

connect_the_dotfiles's People

Contributors

smarcy avatar

Stargazers

 avatar Qaziquza avatar Michael A. Sinclair avatar Hugo Sena Ribeiro avatar Jordan Callicoat avatar  avatar

Watchers

 avatar

connect_the_dotfiles's Issues

Remove hard link

In the first function, I can see the following hard link :

    if (readFile(StorageFile).contains(chosenDotfile)) or symlinkExists(chosenDotfile):
      copyFileToDir("/home/marc/git/dotfiles/.vimrc", DotfilesLocation)

Could you change this to ~/git/dotfiles/.vimrc ? I think you might better replace this with a variable that you define at the top of your source file.

Which Linux Distribution is supported ?

Right now, the following is announced :

Right now I am concentrating on Linux only and I do not intend to port to Windows anytime, yet.

I do not even see why we would organize dotfiles in Windows. The configuration is more register based and the OS does not really permit the configuration.

We do not know which distribution of Linux you use, or on which distribution you have tested your program.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.