Configurationĭotbot uses YAML or JSON-formatted configuration files to let you specify how JSON configuration files areĬonventionally named. The configuration file is typically written in YAML, but it can also be written defaults : link : relink : true - clean : - link : ~/.nf : nf ~/.vim : vim ~/.vimrc : vimrc - create : - ~/downloads - ~/.vim/undo-history - shell :. The conventional name for the configuration file is. Here's an example of a complete configuration. If you prefer, you can install Dotbot from PyPI and call it as a command-line Subrepo, run git fetch & git checkout origin/master in the Dotbot directory. The old version of Dotbot will be checked out by the install script. Submodule be sure to commit your changes before running. If using a submodule, run git submodule update -remote dotbot, substituting dotbot with the path to the Dotbot Setting up Dotbot as a submodule or subrepo locks it on the current version. You can change either of these parameters byĮditing the variables in the install script appropriately. By default, the scriptĪssumes that the configuration is located in the Dotbot Version of Dotbot and calls the full Dotbot installer. Note: The install script is merely a shim that checks out the appropriate To help you get started we have anĮxample config file as well as configurationĭocumentation for the accepted parameters. To get started, you just need to fill in the and Dotbot Python 3.8+, and it requires that your account is allowed to create symbolic If you are using PowerShell instead of a POSIX shell, you can use the provided Hg init # initialize repository if needed echo "dotbot = " >. If you're using Mercurial, you can add Dotbot as a subrepo: cd ~/.dotfiles # replace with the path to your dotfiles gitmodules dirty # ignore dirty commits in the submodule Git init # initialize repository if needed If you're using Git, you can add Dotbot as a submodule: cd ~/.dotfiles # replace with the path to your dotfiles The following will help you get set up using Dotbot in just a few steps. You're just looking for some inspiration, we've got you covered. Template repository, check out dotfiles_template. Great! You can automate the creation of your dotfiles by using the Replacement for any other tool you were using to manage your dotfiles, andĭotbot is VCS-agnostic - it doesn't make any attempt to manage your dotfiles.Įxplanations of how to organize your dotfiles. It does less than you think, because versionĭotbot is designed to be lightweight and self-contained, with no externalĭependencies and no installation required. Directives ( Link, Create, Shell, Clean, Defaults)ĭotbot is a tool that bootstraps your dotfiles (it's a files.install, even on a freshly installed system! Assuming you want the 3 files specified from above, we can run the following commands to move them in.Dotbot makes installing your dotfiles as easy as git clone $url & cd dotfiles &. Next, we move the files we want to link into our repository. In this case, it installs any submodules. This section contains any raw shell commands that you'd like to run upon running your install script. In the above example, we have 3 files that commonly contain customizations. Here we define where we want the symlink to be once linked, and what file should be linked there. This is where most of your modifications will take place. This simply defines what directory should be inspected for dead links. There are additional options that may be worth looking at in the documentation relink removes the old target if it is a symlink. Let's go through each section to see what it doesĭefaults controls what action will be taken for everything in the link section. The first step is to get a git repository started and add dotbot as a submoduleĮnter fullscreen mode Exit fullscreen mode Python is the only dependency (standard for almost all distros).Single command to install on a new machine via symbolic links.On investigating a number of tools out there, dotbot's features set it apart from the others: With a framework, most of the use-cases have been thought of, so it is very low friction in comparison. I previously went this route, but I would constantly run into edge-cases leading to constant modification of the scripts. While it could be tempting for some to script your dotfiles configuration and installation yourself, I would advise against going this route. In this tutorial, we'll be setting up a dotfiles repository and bootstrapping it using dotbot. Having your dotfiles in a repo allows you to take your configuration anywhere. A customized set of dotfiles can vastly increase your command-line productivity and happiness.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |