GithubHelp home page GithubHelp logo

dotfiles's Introduction

ymendel's dotfiles

For system personalization, easy set-up, &c &c.

Consideration

This repo is really just for me, and I'll be honest and say that right now. I also don't have a lot of different machines, so it tends to be more targetted and less robust for widespread use than other dotfiles repos you may find. With that said, I'm far from against other people using any of this. I just felt I should make that clear.

Also, if you want to use these dotfiles, I strongly suggest you first review the contents and see what works for you. Make your own copy. It's all about personalizing a system to you, not just blindly using someone else's settings. You could be in for a bad time if you do that.

Installation

Using git and the bootstrap script

This can be cloned wherever you like, but I like to keep it along with other projects in ~/dev/projects/mine. The bootstrap script will create the ~/.dotfiles symlink, among other things.

git clone https://github.com/ymendel/dotfiles.git
cd dotfiles
script/bootstrap

Organization

Topics

This is separated into topic directories. Instead of a single large file (or a small set of large files) to handle everything, things are broken up into small directories and files (viz. git, ruby, system, shell, macos). I find it easier to understand and handle with this separation.

Locations

  • script/: This is the location for scripts and commands that handle the dotfiles project itself, like script/bootstrap
  • bin/: This gets added to the $PATH and anything in here is available to run everywhere. This is a sort of general, catch-all location for commands and utilities that don't fit elsewhere. Also, updot lives here. (see below)
  • topic/bin/: These directories also get added to the $PATH, for topic-related commands that will be made available to run everywhere.
  • topic/*.bash: Any files ending in .bash get loaded into the environment.
  • topic/install.sh: Any file named install.sh is executed by script/install (which is run by updot). These end in .sh instead of .bash to avoid being loaded automatically.
  • topic/*.symlink: Any file ending in .symlink gets symlinked into $HOME with a prepended . (e.g. git/gitconfig.symlink β†’ ~/.gitconfig) This lets all of these files stay versioned in the dotfiles repository, but still be useful in their expected locations. These files are symlinked by script/bootstrap (not updot).
  • ~/.local/bashrc: This file will be sourced if it exists, allowing you to have special per-machine differences.

Rejuvenation

updot

The updot command is provided to easily stay up-to-date. It installs dependencies, runs install scripts, sets defaults, &c. Run this script occasionally to keep your system and environment up-to-date.

Note: Running updot will not update the git repository, and this is by design. It only updates the system with the current contents of the repository. It also (by design) doesn't update already-installed Homebrew formulae. Those can be handled separately with brew.

Appreciation

This organization was largely inspired by Zach Holman and his wonderful dotfiles repo. There were some things I wanted to do differently. Some of those I gave up on simply because his stuff was so good.

Along the way, I've gotten a good bit from other repos. Of particular note, and in no particular order:

dotfiles's People

Contributors

ymendel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotfiles's Issues

Making keyboard shortcuts show up in System Preferences

I was googling around and I happened upon your dot files, where you state this on your keyboard shortcut adding commands:

These shortcuts will not show in System Preferences

All you have to do is add an entry to the com.apple.custommenu.apps to the com.apple.universalaccess preference. Don’t add duplicates, or you will make System Preferences crash. I have a function that I use to prevent this:

function addCustomMenuEntryIfNeeded
{
    if [[ $# == 0 || $# > 1 ]]; then
        echo "usage: addCustomMenuEntryIfNeeded com.company.appname"
        return 1
    else
        contents=`defaults read com.apple.universalaccess "com.apple.custommenu.apps"`
        grepResults=`echo $contents | grep $1`
        if [[ -z $grepResults ]]; then
            # does not contain app
            defaults write com.apple.universalaccess "com.apple.custommenu.apps" -array-add "$1"
        else
            # contains app already, so do nothing
        fi
    fi
}

And I use it like this:

function fixTerminal
{
    defaults write com.apple.Terminal NSUserKeyEquivalents '{ "Select Next Tab" = "^\U21e5"; "Select Previous Tab" = "^$\U21e5"; }'
    addCustomMenuEntryIfNeeded "com.apple.Terminal"
}

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.