initial commit

master
missytake 2020-07-10 12:13:38 +02:00
commit 6bf1ea59aa
9 changed files with 154 additions and 0 deletions

23
dot_bash_aliases Normal file
View File

@ -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"

33
dot_profile Normal file
View File

@ -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

9
dot_tmux.conf Normal file
View File

@ -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

0
dot_vim/.keep Normal file
View File

2
dot_vim/vimrc Normal file
View File

@ -0,0 +1,2 @@
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab

0
private_dot_config/.keep Normal file
View File

View File

View File

@ -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

View File

@ -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