Skip to content

Commit 3dde85a

Browse files
committed
Initial dotfiles rework.
1 parent 8e63c69 commit 3dde85a

33 files changed

+888
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git/gitconfig.local.symlink

Brewfile

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
cask_args appdir: '/Applications'
2+
3+
tap 'caskroom/cask'
4+
tap 'caskroom/fonts'
5+
tap 'caskroom/versions'
6+
7+
tap 'homebrew/bundle'
8+
tap 'homebrew/completions'
9+
tap 'homebrew/core'
10+
tap 'homebrew/dupes'
11+
tap 'homebrew/php'
12+
tap 'homebrew/services'
13+
tap 'homebrew/versions'
14+
15+
brew 'ansible'
16+
brew 'assh'
17+
brew 'coreutils'
18+
brew 'curl'
19+
brew 'go'
20+
brew 'grc'
21+
brew 'docker'
22+
brew 'docker-machine'
23+
brew 'docker-compose'
24+
brew 'imagemagick'
25+
brew 'libgit2'
26+
brew 'openssl'
27+
brew 'mas'
28+
brew 'node'
29+
brew 'readline'
30+
brew 'ruby-build'
31+
brew 'rbenv'
32+
brew 'python'
33+
brew 'tmate'
34+
brew 'unrar'
35+
brew 'wget'
36+
brew 'zsh'
37+
brew 'zsh-completions'
38+
brew 'suspicious-package'
39+
brew 'quicklook-json'
40+
brew 'qlmarkdown'
41+
brew 'qlstephen'
42+
brew 'qlcolorcode'
43+
brew 'p4mergetool'
44+
45+
brew 'homebrew/completions/brew-cask-completion'
46+
brew 'homebrew/dupes/grep'
47+
brew 'homebrew/dupes/make'
48+
brew 'homebrew/dupes/ncurses'
49+
brew 'homebrew/dupes/nano'
50+
brew 'homebrew/dupes/unzip'
51+
brew 'homebrew/dupes/whois'
52+
brew 'homebrew/php/php56'
53+
brew 'homebrew/php/php56-xdebug'
54+
brew 'homebrew/php/php70'
55+
brew 'homebrew/php/php70-imagick'
56+
brew 'homebrew/php/php70-xdebug'
57+
brew 'homebrew/php/php71'
58+
59+
cask '1password'
60+
cask 'cleanmymac'
61+
cask 'dropbox'
62+
cask 'firefox'
63+
cask 'franz'
64+
cask 'google-chrome'
65+
cask 'google-drive'
66+
cask 'gpgtools'
67+
cask 'phpstorm'
68+
cask 'poedit'
69+
cask 'sequel-pro'
70+
cask 'slack'
71+
cask 'skype'
72+
cask 'sublime-text'
73+
cask 'transmit'
74+
cask 'tower'
75+
cask 'vagrant'
76+
cask 'virtualbox'
77+
cask 'vlc'
78+
79+
mas 'Xcode', id: 497799835
80+
mas 'Pages', id: 409201541
81+
mas 'Harvest', id: 506189836
82+
mas 'iA Writer', id: 775737590

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) Zach Holman, http://zachholman.com
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1-
# dotfiles
2-
My dotfiles.
1+
# Paschi's dotfiles
2+
3+
Your dotfiles are how you personalize your system. These are mine. They are basically forked from
4+
[Holman](https://github.com/holman/dotfiles)' great dotfiles. See the description for detailed infos.
5+
6+
## install
7+
8+
Run this:
9+
10+
```sh
11+
git clone https://github.com/hubersen/dotfiles.git ~/.dotfiles
12+
cd ~/.dotfiles
13+
script/bootstrap
14+
```
15+
16+
## thanks
17+
18+
Thank's to all of your dotfiles. Mine where built out of yours.
19+
20+
[Holman](https://github.com/holman/dotfiles)
21+
[Paul Millr](https://github.com/paulmillr/dotfiles)
22+
[Pascal Birchler](https://github.com/swissspidy/dotfiles)

bin/dot

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
#
3+
# dot
4+
#
5+
# `dot` handles installation, updates, things like that. Run it periodically
6+
# to make sure you're on the latest and greatest.
7+
export ZSH=$HOME/.dotfiles
8+
9+
# Set macOS defaults
10+
$ZSH/macos/set-defaults.sh
11+
12+
# Install homebrew
13+
$ZSH/homebrew/install.sh 2>&1
14+
15+
# Upgrade homebrew
16+
echo "› brew update"
17+
brew update
18+
19+
# Install software
20+
echo "$ZSH/script/install"
21+
$ZSH/script/install

bin/e

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
#
3+
# Quick shortcut to an editor.
4+
#
5+
# This means that as I travel back and forth between editors, hey, I don't have
6+
# to re-learn any arcane commands. Neat.
7+
#
8+
# USAGE:
9+
#
10+
# $ e
11+
# # => opens the current directory in your editor
12+
#
13+
# $ e .
14+
# $ e /usr/local
15+
# # => opens the specified directory in your editor
16+
exec "$EDITOR" "${1:-.}"

bin/set-defaults

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
#
3+
# Sets macOS defaults by running $ZSH/macos/set-defaults.sh.
4+
5+
exec $ZSH/macos/set-defaults.sh

functions/extract

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
#
3+
# Usage: extract <file>
4+
# Description: extracts archived files / mounts disk images
5+
# Note: .dmg/hdiutil is macOS-specific.
6+
#
7+
# credit: http://nparikh.org/notes/zshrc.txt
8+
extract () {
9+
if [ -f $1 ]; then
10+
case $1 in
11+
*.tar.bz2) tar -jxvf $1 ;;
12+
*.tar.gz) tar -zxvf $1 ;;
13+
*.bz2) bunzip2 $1 ;;
14+
*.dmg) hdiutil mount $1 ;;
15+
*.gz) gunzip $1 ;;
16+
*.tar) tar -xvf $1 ;;
17+
*.tbz2) tar -jxvf $1 ;;
18+
*.tgz) tar -zxvf $1 ;;
19+
*.zip) unzip $1 ;;
20+
*.ZIP) unzip $1 ;;
21+
*.pax) cat $1 | pax -r ;;
22+
*.pax.Z) uncompress $1 --stdout | pax -r ;;
23+
*.rar) unrar x $1 ;;
24+
*.Z) uncompress $1 ;;
25+
*) echo "'$1' cannot be extracted/mounted via extract()" ;;
26+
esac
27+
else
28+
echo "'$1' is not a valid file"
29+
fi
30+
}

git/aliases.zsh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
2+
3+
# Remove `+` and `-` from start of diff lines; just rely upon color.
4+
alias gd='git diff --color | sed "s/^\([^-+ ]*\)[-+ ]/\\1/" | less -r'
5+
6+
alias gc='git commit'
7+
alias gca='git commit -a'
8+
alias gco='git checkout'

git/completion.zsh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Uses git's autocompletion for inner commands. Assumes an install of git's
2+
# bash `git-completion` script at $completion below (this is where Homebrew
3+
# tosses it, at least).
4+
completion='$(brew --prefix)/share/zsh/site-functions/_git'
5+
6+
if test -f $completion
7+
then
8+
source $completion
9+
fi

git/gitconfig.symlink

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
[alias]
2+
c = commit -am
3+
up = pull
4+
p = push
5+
s = status
6+
co = checkout
7+
cp = cherry-pick
8+
df = diff --color --color-words --abbrev
9+
l = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
10+
11+
# Show the diff between the latest commit and the current state
12+
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
13+
14+
# See https://johnblackbourn.com/git-changelog-generator
15+
changelog = "!_() { t=$(git describe --abbrev=0 --tags); git log ${t}..HEAD --no-merges --pretty=format:'* %s'; }; _"
16+
17+
# Save patch file to Desktop
18+
patch = "!f() { \
19+
git add . && git diff --cached > ~/Desktop/$1.diff; \
20+
}; f"
21+
22+
# Find commits by source code.
23+
cc = "!f() { \
24+
git log --pretty=custom --decorate --date=short -S\"$1\"; \
25+
}; f"
26+
27+
# Find commits by commit message.
28+
cm = "!f() { \
29+
git log --pretty=custom --decorate --date=short --grep=\"$1\"; \
30+
}; f"
31+
32+
# Remove the tag with the specified tag name if exists and tag the latest commit with that name.
33+
retag = "!f() { \
34+
git tag -d "$1" &> /dev/null; \
35+
git tag $1; \
36+
}; f"
37+
[color]
38+
ui = always
39+
40+
[color "diff"]
41+
meta = yellow bold
42+
commit = green bold
43+
frag = magenta bold
44+
old = red bold
45+
new = green bold
46+
whitespace = red reverse
47+
48+
[color "diff-highlight"]
49+
oldNormal = red bold
50+
oldHighlight = "red bold 52"
51+
newNormal = "green bold"
52+
newHighlight = "green bold 22"
53+
54+
[color "branch"]
55+
current = yellow reverse
56+
local = yellow
57+
remote = green
58+
59+
[color "status"]
60+
added = yellow
61+
changed = green
62+
untracked = cyan
63+
64+
[commit]
65+
gpgsign = true
66+
67+
[core]
68+
attributesfile = ~/.gitattributes
69+
excludesfile = ~/.gitignore
70+
autocrlf = false
71+
editor = nano
72+
pager = diff-so-fancy | less --tabs=4 -RFX
73+
74+
[diff]
75+
noprefix = true
76+
mnemonicprefix = false
77+
compactionHeuristic = true
78+
tool = p4mergetool
79+
80+
[difftool "p4mergetool"]
81+
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge $LOCAL $REMOTE
82+
83+
[fetch]
84+
prune = true
85+
86+
[gpg]
87+
program = /usr/local/bin/gpg_wrap
88+
89+
[help]
90+
# correct typos
91+
autocorrect = 1
92+
93+
[merge]
94+
tool = p4mergetool
95+
96+
[mergetool "p4mergetool"]
97+
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge $PWD/$BASE $PWD/$REMOTE $PWD/$LOCAL $PWD/$MERGED
98+
trustExitCode = false
99+
100+
[mergetool]
101+
keepBackup = false
102+
103+
[pretty]
104+
custom = "%C(magenta)%h%C(red)%d %C(yellow)%ar %C(green)%s %C(yellow)(%an)"
105+
# │ │ │ │ └─ author name
106+
# │ │ │ └─ message
107+
# │ │ └─ date (relative)
108+
# │ └─ decorations (branch, heads or tags)
109+
# └─ hash (abbreviated)
110+
111+
[push]
112+
# push easily. http://stackoverflow.com/a/23918418/89484
113+
default = current
114+
followTags = true
115+
116+
[rebase]
117+
autostash = true
118+
119+
[stash]
120+
showPatch = true
121+
122+
[user]
123+
# Don't guess the user's identity.
124+
# https://github.com/git/git/blob/90f7b16b3adc78d4bbabbd426fb69aa78c714f71/Documentation/config.txt#L2847-L2855
125+
useConfigOnly = true
126+
127+
[include]
128+
# use separate file for username / github token / etc.
129+
# at the end so it can override any of the above configs
130+
path = ~/.gitconfig.local

git/gitignore.symlink

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Linux
2+
*~
3+
4+
# macOS
5+
._*
6+
.DS_Store
7+
.Trashes
8+
9+
# Intellj
10+
.idea
11+
12+
# Windows
13+
Thumbs.db
14+
15+
# Miscellaneous
16+
*.pyc
17+
node_modules
18+
npm-debug.log

0 commit comments

Comments
 (0)