Giter VIP home page Giter VIP logo

dotfiles's Introduction

dotfiles

Clone this repository with:

git clone --recursive https://github.com/brgmnn/dotfiles.git

The --recursive flag includes submodules. If you forgot to clone with --recursive then you can just run the following command from the repository root:

git submodule update --init --recursive

Dependencies

If you want to clone and install my dotfiles as I do, then you will need the following things installed:

  • Git
  • GNU Stow

You can of course use code snippets, download folders over http and place them wherever you like in which case you won't need all/any of these dependencies.

Using Stow

I use GNU Stow to place the dotfiles in my home directory as followed from this guide:

http://taihen.org/managing-dotfiles-with-gnu-stow/

Group different applications or machines or whatever you want under subfolders in dotfiles, for example:

~/dotfiles/
    bash/
        .bashrc
        .bashrc_aliases
    bin/
        bin/
            script.sh
            my-tool.py
    irssi/
        .config
    themes/
    vim/
        .vimrc
        .vim/
            bundle/
            colors/
    zsh/
        .zshrc
        .zshenv

In this example all files relating to vim are grouped under a vim folder, all bash files under a bash folder etc.

Then load a subfolder (for instance vim) with:

cd ~/dotfiles
stow vim

To unload a subfolder:

stow -D vim

To reload a subfolder:

stow -R vim

Use -t to load symlinks in any location:

stow -t /home/user vim

Using Stow it becomes very easy to load and unload a collection of dotfiles in to your home folder. While it doesn't seem to give many benefits if you just want a copy of your ~/.vim folder, it works well in cases where you need to merge folders (provided there are file conflicts).

For example, if you have a folder ~/bin which contains files that look something like:

$ ls -lah ~/bin
drwxr-xr-x.  2 dan user 4.0K Dec  3 22:54 .
drwxr-xr-x. 39 dan user 4.0K Dec  4 19:18 ..
-rwxr-xr-x.  1 dan user  16K Nov 28 21:19 ffmpeg
-rwxr-xr-x.  1 dan user  513 Oct  7 18:08 localscript.sh
-rwxr-xr-x.  1 dan user   65 Oct 14 19:26 localscript2.py

After running stow bin from the dotfiles repository, your ~/bin folder would now look something like this:

$ ls -lah ~/bin
drwxr-xr-x.  2 dan user 4.0K Dec  3 22:54 .
drwxr-xr-x. 39 dan user 4.0K Dec  4 19:18 ..
-rwxr-xr-x.  1 dan user  16K Nov 28 21:19 ffmpeg
-rwxr-xr-x.  1 dan user  513 Oct  7 18:08 localscript.sh
-rwxr-xr-x.  1 dan user   65 Oct 14 19:26 localscript2.py
lrwxrwxrwx.  1 dan user   27 Dec  3 22:54 script.sh -> ../dotfiles/bin/bin/script.sh
lrwxrwxrwx.  1 dan user   28 Dec  3 22:54 my-tool.py -> ../dotfiles/bin/bin/my-tool.py

Stow has only symlinked the files it needed to. If however there was no existing ~/bin folder then Stow would simply symlink the folder.

When do I need to reload folder?

If in doubt over when you need to reload folders with Stow, just reload every time you add or remove files. This way any changes should appear in the correct places.

dotfiles's People

Contributors

brgmnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotfiles's Issues

active-networks doesn't work correctly on OSX

ifconfig returns a different string for the interface names. The command used to fetch the interfaces, ifconfig | grep '^[a-z]' | awk '{print $1}', looks like this:

1:lo0:
2:eth0:

Where as we expect this:

lo0
eth0

Vim becomes laggy over time

Vim becomes almost unuseable with lag after an hour or so of extended use. Most lag is experienced when navigating in a window. Seems to be alleviated briefly when changing tabs or reloading .vimrc.

git-replace-author error in executing command

The script to perform a branch filter updating an author doesn't actually run the command as there is a syntax error. At the moment it just prints out a valid git command which the user can then run manually.

Vim segfaults after extended use

After an extended period of time Vim becomes slow and eventually segfaults. It's likely a problem in .vimrc or one of the vim plugins.

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.