refactoring

This commit is contained in:
Daniel Flanagan 2016-01-06 12:23:59 -06:00
parent 76437e17a4
commit 6c07872978
19 changed files with 60 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
colors/gen/vendor
colors/gen/tmp
*.lock

0
git/arch_setup.bash → arch_linux_init/git.bash Normal file → Executable file
View File

4
arch_linux_init/utils.bash Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
sudo pacman -S the_silver_searcher --noconfirm

31
link_all.bash Executable file
View File

@ -0,0 +1,31 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/" && pwd)
source "$DIR/variables.bash"
# Let user know that this script will delete their current configuration and
# that they should read this script before running. We'll use a lock file so
# the user only needs to agree once.
if [ -f "$DIR/agree_to_bootstrap.lock" ]; then
# User agreed already - do nothing
echo "Linking..."
else
echo "Running this script may delete existing personal configuration files."
echo "Please view this script's source, fully understand it, and backup any files"
echo "before continuing."
read -r -p "Are you sure you want to continue? [y/N] " response
response=${response,,} # to_lower
if [[ $response =~ ^(yes|y)$ ]]; then
touch "$DIR/agree_to_bootstrap.lock"
else
exit 1
fi
fi
source "$DOTFILES_PATH/colors/link.bash"
source "$DOTFILES_PATH/git/link.bash"
source "$DOTFILES_PATH/vim/link.bash"
source "$DOTFILES_PATH/sh/link.bash"
source "$DOTFILES_PATH/x/link.bash"
source "$DOTFILES_PATH/wm/link.bash"

0
readme.md Normal file
View File

View File

@ -4,9 +4,18 @@ BASE16_SHELL="$DOTFILES_PATH/colors/shell"
[[ -s "$BASE16_SHELL" ]] && source "$BASE16_SHELL"
# filesystem aliases
alias l="ls --color=auto"
alias ll="ls -l --color=auto"
alias la="ls -la --color=auto"
alias lx='ls -lXB' # order by filetype
alias lk='ls -lSr' # order by filesize reversed
alias lt='ls -ltr' # order by file modified time
alias lc='ls -ltcr' # order by filectime
alias lu='ls -ltur' # order by file access time
alias ls='ls -h --color --group-directories-first' # flat view w/ directories first
alias l='ls -h --color --group-directories-first' # same as above
alias ll='ls -lv --group-directories-first' # non-flat view
alias lm='ll | more'
alias lr='ll -R' # please don't
alias la='ll -A' # show all
alias tree='tree -Csuh'
# navigation aliases
alias cd..="cd .."

3
variables.bash Normal file → Executable file
View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
# This script will seriously nuke your home directory. You should really read each of the scripts that will be executed in those process.
# This script will seriously nuke your home directory. You should really read
# each of the scripts that will be executed in those process.
DOTFILES_PATH=$HOME/.dotfiles
REPOSITORY_PATH=$HOME/Documents/Repositories

View File

@ -8,3 +8,13 @@ rm "$HOME/.Xresources"
ln -s "$HOME/.dotfiles/x/xinitrc" "$HOME/.xinitrc"
ln -s "$HOME/.dotfiles/x/xresources" "$HOME/.Xresources"
xrdb "$HOME/.Xresources"
if [ -f "$HOME/.Xresources.colors" ]; then
xrdb -merge "$HOME/.Xresources.colors"
fi
if [ -f "$HOME/.Xresources.env" ]; then
xrdb -merge "$HOME/.Xresources.env"
fi