Giter VIP home page Giter VIP logo

dot-dots's Introduction

dot/dots Netlify Status

A fast and easy bootstrap for my dotfiles that also acts as a simple management script once installed. Bootstrapping is as simple as:

curl https://dots.00dani.me | zsh

If you're wary about piping scripts into your shell - you should be - then feel free to download the script and check it out first. dots is designed to crash harmlessly rather than run something dangerous if curl is interrupted, however.

curl https://dots.00dani.me > dots
less dots
# reviewing ... looks okay!
zsh dots

When run through either of these methods, dots will install itself, GNU Stow (if not already installed globally), and my configuration for git, vim, and zsh.

By default, packages are installed by dots to ~/dotfiles and then linked into ~ using Stow. Environment variables are available for customising this behaviour.

Environment Variables

  • DOTFILES - the location to clone new packages. Defaults to ~/dotfiles. Don't set it to ~, because that'll just be super confusing.
  • DOTS_SOURCE_PREFIX - a URL prefix that will be prepended to simple package names, like "git" and "vim". Defaults to https://git.00dani.me/dot. You might want to change this to point at your own Git hosting.
  • STOW - which GNU Stow binary to use. Defaults to stow. You probably don't need to change this.
  • HOME - the target directory for linking packages. Probably not a good idea to change this either.

Subcommands

Much like git and many other tools, dots is based around subcommands for accessing particular functions. The available commands are:

bootstrap

Set up dotfiles on a brand-new system. Will create a DOTFILES package directory, clone GNU Stow into it if necessary, clone itself and other default packages, and then link everything using Stow. This is the default command if dots is run on a system where DOTFILES doesn't already exist, leading to the succinct bootstrap snippet shown above.

clone

Will clone one or more packages specified into your DOTFILES directory. Packages must be specified as Git repository URLs, but two forms of shorthand are supported:

  • GitHub package paths: "sharkdp/bat", "hlandau/acmetool". "https://github.com/" will automatically be prepended to find the correct GitHub repository.
  • Simple package names: "git", "emacs", "task". The entire DOTS_SOURCE_PREFIX is prepended to these names, hopefully producing a URL that points to your self-hosted Git service.

fetch

Will simply run git fetch -p for each of the specified package names. If there are no package names provided, will implicitly run over all packages.

stow

Will employ GNU Stow to symlink each of the packages specified by name into your HOME. If no package names are provided, will implicitly link all packages.

Additionally, unstow and restow commands are available with the same interface. These three commands correspond to the -S, -D, and -R modes Stow can be run in.

pull

Very similar to fetch. Will simply run git pull for each of the specified package names. If there are no package names provided, will implicitly run over all packages.

status

Can be abbreviated to st. Will list all packages you have cloned into your dotfiles directory, along with their Git status (whether the working directory is clean, whether there are commits to push or pull, that sort of thing). This command is the default if you have already bootstrapped.

dot-dots's People

Contributors

00dani avatar

Watchers

 avatar  avatar

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.