www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DotfiM v0.0.1 - A dotfile manager

reply Timoses <timosesu gmail.com> writes:
Thought I'd try a release of this project of mine which I find 
very useful.

https://github.com/Timoses/dotfim

DotfiM is capable of syncing your dotfiles across machines via a 
git repository. Simply download DotfiM, build it and run `dotfim 
sync <your dotfile git repo>`. DotfiM asks if you would like to 
install all the dotfiles in the git repository to your local home 
folder.

DotfiM is very useful if you set up your environment via 
dotfiles. This could include your vim setup or how your shell 
looks and behaves. The goal of DotfiM is to take your environment 
setup anywhere you go.

DotfiM will create two sections in a synced dotfile:
- One section is synchronized to the git repository
- another is only kept locally


I'd be thrilled to hear if it works for you. Let me know of any 
issues or ideas you might have.


Note that I've started this project almost a year ago when I was 
still in "Dinfant shoes".



What is a dotfile?
Basically, it's a configuration file on UNIX systems and can be 
used to customize your environment.
Jun 30
next sibling parent reply Francesco Mecca <me francescomecca.eu> writes:
On Saturday, 30 June 2018 at 14:27:39 UTC, Timoses wrote:
 Thought I'd try a release of this project of mine which I find 
 very useful.

 https://github.com/Timoses/dotfim

 DotfiM is capable of syncing your dotfiles across machines via 
 a git repository. Simply download DotfiM, build it and run 
 `dotfim sync <your dotfile git repo>`. DotfiM asks if you would 
 like to install all the dotfiles in the git repository to your 
 local home folder.

 DotfiM is very useful if you set up your environment via 
 dotfiles. This could include your vim setup or how your shell 
 looks and behaves. The goal of DotfiM is to take your 
 environment setup anywhere you go.

 DotfiM will create two sections in a synced dotfile:
 - One section is synchronized to the git repository
 - another is only kept locally


 I'd be thrilled to hear if it works for you. Let me know of any 
 issues or ideas you might have.


 Note that I've started this project almost a year ago when I 
 was still in "Dinfant shoes".



 What is a dotfile?
 Basically, it's a configuration file on UNIX systems and can be 
 used to customize your environment.
It would be interesting if you highlights the difference between the traditional stow approach: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html On top of my mind I have this questions: Are you using symlinks? Can I sync parts of the dotfiles?
Jul 03
parent Timoses <timosesu gmail.com> writes:
On Tuesday, 3 July 2018 at 16:31:39 UTC, Francesco Mecca wrote:
 On Saturday, 30 June 2018 at 14:27:39 UTC, Timoses wrote:
 Thought I'd try a release of this project of mine which I find 
 very useful.

 https://github.com/Timoses/dotfim

 DotfiM is capable of syncing your dotfiles across machines via 
 a git repository. Simply download DotfiM, build it and run 
 `dotfim sync <your dotfile git repo>`. DotfiM asks if you 
 would like to install all the dotfiles in the git repository 
 to your local home folder.

 DotfiM is very useful if you set up your environment via 
 dotfiles. This could include your vim setup or how your shell 
 looks and behaves. The goal of DotfiM is to take your 
 environment setup anywhere you go.

 DotfiM will create two sections in a synced dotfile:
 - One section is synchronized to the git repository
 - another is only kept locally


 I'd be thrilled to hear if it works for you. Let me know of 
 any issues or ideas you might have.


 Note that I've started this project almost a year ago when I 
 was still in "Dinfant shoes".



 What is a dotfile?
 Basically, it's a configuration file on UNIX systems and can 
 be used to customize your environment.
It would be interesting if you highlights the difference between the traditional stow approach: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html On top of my mind I have this questions: Are you using symlinks? Can I sync parts of the dotfiles?
I must admit, I didn't look around much for dotfile management tools before implementing DotfiM. I just jumped at the opportunity for a D project. Compared to Stow I'd highlight the following differences: - DotfiM doesn't use symlinks, instead contents of the gitfiles (the dotfiles saved in the git repository) are thrown into your home directory while keeping already existing content of the dotfile (in the home directory) in a local "section". In effect the dotfile then contains two sections, one which is synced with the git repo and one which is kept only locally. The resulting dotfile in the home directory will look something like this: # This dotfile is managed by DotfiM #-------------DotFiM-------------# # DotfiM - Git Section # Changes to this section are synchronized with your dotfiles repo # Git Commit Hash: aaa19f7f595bc9f0d6e5bdbeb1b8a1f93cdfe803 # - - - - - - - - - - - # My synced setups ... # - - - - - - - - - - - # DotfiM - end of Git Section #-------------DotFiM-------------# #-------------DotFiM-------------# # DotfiM - Local Section # This section is only kept locally and will not be synced # - - - - - - - - - - - # Any stuff only locally applied # - - - - - - - - - - - # DotfiM - end of Local Section #-------------DotFiM-------------# If you decide that you no longer want to sync the dotfile just do `dotfim remove <file>` and it'll remove the synced part and only leave the local section in place. Since all content of the synced section is already synced to the git repo, nothing should be lost. - So, compared to Stow the git repository is organized as a "mirror" of the actual dotfile repository and not organized in packages. - Lastly, DotfiM automatically syncs your changes to the dotfiles in the home folder when running `dotfim` and takes over all the fetching and pushing to the git repository. How does Stow work when you already have an existing file and install another? Symlinking would delete the old file and just replace it with a symlink to the new file in the stow package? Implementing something like profiles could be interesting, though I haven't had the need for it so far and therefore also didn't think of any strategy of implementing such a feature.
Jul 04
prev sibling parent reply biocyberman <biocyberman gmail.com> writes:
On Saturday, 30 June 2018 at 14:27:39 UTC, Timoses wrote:
 Thought I'd try a release of this project of mine which I find 
 very useful.

 [...]
Dot files are usually very personalized. I wonder what DotfiM can do more than cloning and linking stuffs.
Jul 04
parent Timoses <timosesu gmail.com> writes:
On Wednesday, 4 July 2018 at 09:36:18 UTC, biocyberman wrote:
 On Saturday, 30 June 2018 at 14:27:39 UTC, Timoses wrote:
 Thought I'd try a release of this project of mine which I find 
 very useful.

 [...]
Dot files are usually very personalized. I wonder what DotfiM can do more than cloning and linking stuffs.
Currently not much more. "Personalization" is the keyword I guess, at least in my use case. For example I use it to have the same setup on different machines for my - tmux (navigation setup, ...) - vim (.vimrc, filetype setup, plugin stuff which will auto load everything on first start of vim, key bindings, ...) - zsh (prompt, ...) - ssh configuration (e.g. aliases for remote hosts) - general git configuration (different logging styles, my user details, my github username when connecting to github, ...) Whenever I optimize my setup I just have to run `dotfim` and it'll automatically be synced to any other machine I succeedingly run `dotfim` on. Currently, I have it set up so that any time I log into a shell on a computer it runs `dotfim` automatically, and once again when I log out.
Jul 04