Giter Site home page Giter Site logo

mnewt / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 7.13 MB

Shell settings, trying to be shell agnostic, supporting bash, fish and zsh.

License: The Unlicense

Shell 65.62% Ruby 2.31% Python 14.78% Clojure 0.05% Lua 16.59% PowerShell 0.50% AppleScript 0.15%
dotfiles fish bash zsh vim tmux atom clojure git rbenv

dotfiles's Introduction

Some dotfiles

A shell configuration supporting bash, zsh, and fish.

I spend most of my time in Emacs on macOS. This configuration can work fine on its own, and it has a companion Emacs config.

Most scripts are written in bash because it is the lowest common denominator.

Tour

Applications & Utilities

Included are configurations for some programs, such as:

Install

Clone the repository and link files into the current user’s $HOME directory.

git clone https://github.com/mnewt/dotfiles
dotfiles/bin/install-dotfiles

What it does

The install-dotfiles script links

USAGE: install-dotfiles [-f] [-h] [-t] [-v] [ SOURCE_DIRECTORY ]

Link dotfiles to $HOME. Directories listed in "child_dirs" have their children
linked so as not to interfere with other things in those directories.

SOURCE_DIRECTORY, if not specified, is /Users/mn/code/dotfiles.

OPTIONS:
  -f   Force overwrite of files or directories in $HOME
  -h   Display this help message
  -t   Test mode - don't make any changes
  -v   Verbose - print each action

The install-dotfiles script performs the following functions:

  1. Look for an install-dotfiles-config file in the root of the SOURCE_DIRECTORY. Read variables from that file:
    • child-dirs: A list of directories that will be created.
    • ignore: A list of top level files/directories to be ignored (not linked).
  2. Create a soft link in $HOME to each file in the repo that (a) starts with a ., and (b) isn’t listed in child_dirs.
  3. For each directory in child_dirs, ensure the directory is created in $HOME and then create links in that directory back to the corresponding files in the respective directory within the repo.
  4. Remove any stale links in the destination locations.

A note on bare repos

In a previous iteration of this repo, I had a somewhat lengthy “bare repo” setup. This worked great, except for the fact that various LSP servers, notably bash-language-server, kept trying to index my entire home directory because it found a .git root there. This was pretty annoying and is the main reason I decided to switch back to a linking model.

Update scripts

There are set of update scripts in the bin directory to keep all the different software on a given system up to date.

The master update script runs all of these in succession. Each script is smart enough to figure out whether the appropriate software is installed on the current machine.

These are some of the things which can be updated:

License

All the stuff in this repository is licensed to the public domain under the unlicense.

dotfiles's People

Contributors

azrobbo avatar jferris avatar mike-burns avatar mnewt avatar qrush avatar wolfeidau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

azrobbo

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.