commit 6bf1ea59aa1b3ac50f54d11df37ba67c5c5c9f3f Author: missytake Date: Fri Jul 10 12:13:38 2020 +0200 initial commit diff --git a/dot_bash_aliases b/dot_bash_aliases new file mode 100644 index 0000000..ec3325d --- /dev/null +++ b/dot_bash_aliases @@ -0,0 +1,23 @@ +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -lah' +alias l='ls -lh' +alias diff="diff --color=auto" +alias cm="chezmoi" +alias g="git" + diff --git a/dot_profile b/dot_profile new file mode 100644 index 0000000..020fcdd --- /dev/null +++ b/dot_profile @@ -0,0 +1,33 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# autostart tmux +if [ -t 0 -a -z "$TMUX" ] +then + test -z "$(tmux list-sessions)" && exec tmux new -s "$USER" || exec tmux new -A -s $(tty | tail -c +6) -t "$USER" +fi + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi diff --git a/dot_tmux.conf b/dot_tmux.conf new file mode 100644 index 0000000..427f25d --- /dev/null +++ b/dot_tmux.conf @@ -0,0 +1,9 @@ +set-option -g prefix C-a +set-option -g aggressive-resize on +set-option -g mouse on +set-option -g set-titles on +set-option -g set-titles-string '#I:#W - "#H"' +unbind-key C-b +bind-key ` send-prefix +bind-key a last-window +bind-key k kill-session diff --git a/dot_vim/.keep b/dot_vim/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/vimrc b/dot_vim/vimrc new file mode 100644 index 0000000..1a229ea --- /dev/null +++ b/dot_vim/vimrc @@ -0,0 +1,2 @@ +set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab + diff --git a/private_dot_config/.keep b/private_dot_config/.keep new file mode 100644 index 0000000..e69de29 diff --git a/private_dot_config/git/.keep b/private_dot_config/git/.keep new file mode 100644 index 0000000..e69de29 diff --git a/private_dot_config/git/alias b/private_dot_config/git/alias new file mode 100644 index 0000000..73617b5 --- /dev/null +++ b/private_dot_config/git/alias @@ -0,0 +1,54 @@ +[alias] +comit = commit +commmit = commit +unstage = reset -q HEAD -- +discard = checkout -- +nevermind = !git reset --hard HEAD && git clean -d -f +uncommit = reset --mixed HEAD~ +save = commit -m +resave = commit --amend -m +fold = commit --amend --no-edit +invert = revert +last = log -1 HEAD --format=format:"%Cred%H" +copy-last-hash = !git last | pbcopy +summary = status -u -s +graph = log --graph -10 --branches --remotes --tags --format=format:'%Cgreen%h %Creset• %<(75,trunc)%s (%cN, %ar) %Cred%d' --date-order +history = log -10 --format=format:'%Cgreen%h %Creset%s (%aN, %ar)' +new-branch = checkout -b +rename-branch = branch -m +delete-branch = branch -D +branches = "!git branch | ag -v '\\b(staging|master)\\b'" +recent-branches = branch -a --sort=committerdate +tags = tag +stashes = stash list +prestage = diff -w +precommit = diff -w --cached +remotes = remote -v +move = mv +remove = rm +unmerged = branch --no-merged +unstash = stash pop +what = show +show-last = show HEAD +untrack = rm -r --cached +rewrite = rebase -i +back = checkout "-" +contributors = shortlog -s -n --no-merges +file-trail = log --follow -p -w +merge-trail = log --ancestry-path --merges +unmerged-files = diff --name-only +patch = add --patch +tuck = stash save -u +current-branch = rev-parse --abbrev-ref HEAD +untuck = stash pop "stash@{0}" +boop = "!f() { B=$(git current-branch); git commit --allow-empty -m 'Boop!'; git push origin $B; }; f" +aliases = !git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\:\\ / +autotrack = "!f() { B=$(git current-branch); git branch --set-upstream-to=origin/$B; }; f" +into = "!f() { B=$(git current-branch); git checkout $1; git pull; git merge $B --no-edit; }; f" +into-staging = "!f() { B=$(git current-branch); git checkout staging; git pull; git merge $B --no-edit; }; f" +into-master = "!f() { B=$(git current-branch); git checkout master; git pull; git merge $B --no-edit; }; f" +onto = "!f() { B=$(git current-branch); git checkout master; git pull; git checkout $B; git rebase -i $1; }; f" +work-log = !git log --reverse master...HEAD --format=format:'- %w(0,0,4)%B' +submit = !git push && git autotrack +whodunit = blame -wMC +axe = log --reverse -p -w -S diff --git a/private_dot_config/git/config b/private_dot_config/git/config new file mode 100644 index 0000000..9a575cd --- /dev/null +++ b/private_dot_config/git/config @@ -0,0 +1,33 @@ +[commit] + verbose = true + +[apply] + whitespace = fix # Detect whitespace errors when applying a patch + +[pull] + rebase = true # rebase instead of merge when pulling. Use --no-rebase flag to set back to merge + +[color] + ui = true + diff = auto + status = auto + branch = auto + interactive = true + +[pager] + # insanely beautiful diffs ==> npm install -g diff-so-fancy + diff = (command -v diff-so-fancy >/dev/null && diff-so-fancy | less --tabs=4 -RFX || less) # use diff-so-fancy if available, diff otherwise + show = (command -v diff-so-fancy >/dev/null && diff-so-fancy | less --tabs=4 -RFX || less) # use diff-so-fancy if available, diff otherwise + +[core] + pager = less + editor = vim + +[diff] + renames = copies # Detect copies as well as renames + algorithm = histogram + mnemonicprefix = true # see https://stackoverflow.com/a/28017534 + +[include] + path = alias # save alias in another file +