Code Monkey home page Code Monkey logo

dotfiles's Introduction

dotfiles

Dotfiles for macOS.

Prerequisites

  • brew
  • fish
  • git
  • mint
  • mise
  • port

Install Xcode, Homebrew, and MacPorts first, then run the following script to get the rest installed:

./bootstrap.sh

Other Prerequisites

These are not automatically installed.

Install

NB: Existing files will be overwritten without prompting! Make sure you have a backup.

./setup.fish

How to Extend

Behavior

The setup script will look at all directories at the root of this repository ("concerns"). By default, files in the concern will have links created in $HOME with a . prepended to the name. If a destination file is present, files in the concern will have links created in the the destination path specified with no modifications to the name.

Directories are traversed such that links will only be created for files, not subdirectories. Files in subdirectories are still linked, and the directory structure in the repo is used when creating links. For example, files matching fish/functions/*.fish will have links created in ~/.config/fish/functions.

NB: Using the subdirectory behavior with a concern that does not have destination file may cause unexpected behavior. When using subdirectories, always specify a destination.

Custom Destinations

To specify a different destination for the concern, create a file named destination with the desired path as the file's contents.

Custom Setup

To perform custom steps before files are linked, create a setup.fish file that does your custom setup. Scripts are executed from the root of the repository.

Ignoring Files

To specify filenames that should not be linked to the destination, create a file named ignores. The contents of this file should be a list of filenames, 1 per line, that should not be linked.

Caveats:

  • Filenames are run through fish's string match, so * wildcards work, but globs and other constructs may not
  • Filenames are ignored recursively. e.g. Ignoring *.fish would ignore stuff.fish and things/stuff.fish
  • Every line of the file is treated as a filename to ignore, i.e. no comments
  • The filenames destination, ignores, and setup.fish are always ignored

dotfiles's People

Contributors

klanchman avatar

Stargazers

eg avatar Ian Oroceo avatar

Watchers

James Cloos 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.