/dotfiles-1

My dotfiles (mainly i3 and Emacs I guess)

Primary LanguageCSS

         __      __  _____ __
    ____/ /___  / /_/ __(_) /__  _____
   / __  / __ \/ __/ /_/ / / _ \/ ___/
 _/ /_/ / /_/ / /_/ __/ / /  __(__  )
(_)__,_/\____/\__/_/ /_/_/\___/____/

I intend to use this repository (and also this README file) as a tool to organize myself and my configurations. That way I can incrementally rip whatever I like from my Manjaro configs, store it here and perhaps some day in the near future distro-hop to Arch (either that or use Manjaro Architect).

Configurations that can be found here

Installing

In order to clone and “install” (i.e. copy these dotfiles to their correct location), you should use this script.

Here is it, by the way:

#!/bin/sh

# robust script, stops in case of failure
set -euf

# this script is supposed to be downloaded and ran before the cloning of
# this repository, i.e. run this script to clone
# example usage: chmod +x ./clone_repo.sh; ./clone_repo.sh

# definitions
GIT_DIR="$HOME/.cfg/"
GIT_REPO="git@github.com:hcpsilva/dotfiles.git"
GIT_ALIAS="GIT_DIR=$GIT_DIR GIT_WORK_TREE=$HOME git"

# set-up
echo "alias dotgit='$GIT_ALIAS'" >> $HOME/.$(basename $SHELL)rc
echo $GIT_DIR >> $HOME/.gitignore

# cloning
git clone --bare $GIT_REPO $GIT_DIR

# make sure we checkout (if before where any duplicates)
$GIT_ALIAS checkout -f

# set so that this repo can't see untracked files (otherwise madness)
$GIT_ALIAS config --local status.showUntrackedFiles no

It ensures that the repo is cloned the right way and puts an useful alias in your $SHELL configuration file.