dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit c498b84ad5cca69d1be943d2f6a6e08ab17d327c
parent 4249f08af2e70d17f5166d38e9c96640efe68eac
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 26 Mar 2019 13:52:45 +0100

Update dotfiles commands for new install location, update README instructions

Diffstat:
M.commands.sh | 12+++++-------
MREADME.md | 29+++++++++++++----------------
Ainit/install.sh | 7+++++++
Dinstall.sh | 7-------
4 files changed, 25 insertions(+), 30 deletions(-)

diff --git a/.commands.sh b/.commands.sh @@ -56,13 +56,11 @@ o() { ## editor alias vi='vim -u ~/.vim/vimrc.noplugs' - ## dotfiles alias zshreload="source ~/.zshrc" -alias dotfiles="git --git-dir=$HOME/code/dotfiles/ --work-tree=$HOME" -alias dotfiles-update="cd ~/code/dotfiles && git pull ; zshreload ; cd -" -alias dotfiles-commit="cd ~/code/dotfiles && git commit -a -S -v ; git push ; cd -" - +alias dotfiles="git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME" +alias dotfiles-update="dotfiles pull && zshreload" +alias dotfiles-commit="dotfiles commit -a -S -v ; dotfiles push" ## python alias ipython-prof='ipython -m cProfile -s time' @@ -187,7 +185,7 @@ t-remove-all() { } m-all-sl() { - for d in ~/code/dotfiles/lib/{dwm,slstatus,st,surf,tabbed}; do + for d in ~/lib/{dwm,slstatus,st,surf,tabbed}; do echo echo "## Building $d" (cd "$d" && make clean && make install) @@ -198,7 +196,7 @@ gcagp-all-sl() { msg="Update color scheme" read -r "input?commit message [$msg]: " msg="${input:-$msg}" - for d in ~/code/dotfiles/lib/{dwm,slstatus,st,surf,tabbed}; do + for d in ~/lib/{dwm,slstatus,st,surf,tabbed}; do cd "$d" && \ git commit --all -m "$msg" --verbose --gpg-sign && git push; cd - || return diff --git a/README.md b/README.md @@ -1,22 +1,19 @@ # dotfiles +My configuration files for GNU/Linux utilities. This repository should be +managed as a *bare Git repository*. Install with: -Configuration files for zsh, vim, tmux, X, etc. Licensed under GPL v. 3. + git clone --bare git@gitlab.com:admesg/dotfiles.git $HOME/.dotfiles + /usr/bin/git --git-dir=$HOME/.dotfiles --work-tree $HOME checkout -After cloning the repository, create symbolic links to your home folder using: +Afterwards, log out and log back in. The `dotfiles` command will now be +available as a substitute for the `git` command, and is used to manage all +version-control commands on the files. - ./install.sh - -This script will launch all scripts from the `init/` directory, and -automatically skip the ones that aren't applicable to the host system. This -includes installation of a package manager ([Homebrew](https://brew.sh) for -macOS) and package installation via `brew` or `apt` in the case of Debian -GNU/Linux. The script `init/10_symlinks.sh` will make symbolic links between -everything in the `links/` folder and the home folder. In the case of -conflicts, existing files will be renamed with the suffix `_bck`. +The `init/install.sh` script launches all scripts from the `init/` directory, +and automatically skips the ones that aren't applicable to the host system. +This includes installation of a package manager ([Homebrew](https://brew.sh) +for macOS) and package installation via `pacman` or `apt` in the case of +GNU/Linux. ## Author -Written by Anders Damsgaard. The macOS script `init/10_macos.sh` is inspired -by Mathias Bynen's -[.macos](https://github.com/mathiasbynens/dotfiles/blob/master/.macos) script, -and folder structure and initialization is similar to Ben Alman's [dotfiles -repository](https://github.com/cowboy/dotfiles). +Written by Anders Damsgaard. Licensed under GPL v. 3+. diff --git a/init/install.sh b/init/install.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# Run initialization scripts +for s in *.sh; do + echo -e "\n### $s ###########################" + source "$s" +done diff --git a/install.sh b/install.sh @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -# Run initialization scripts -for s in init/*.sh; do - echo -e "\n### $s ###########################" - source $s -done