Skip to content

Commit

Permalink
Update to own configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
lumaxis committed Feb 9, 2020
1 parent ba4fb90 commit 8507367
Show file tree
Hide file tree
Showing 37 changed files with 533 additions and 988 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.defaultLanguage": "shellscript",
"files.associations": {
".*": "shellscript"
}
}
22 changes: 10 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SHELL = /bin/bash
SHELL = /bin/zsh
DOTFILES_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
OS := $(shell bin/is-supported bin/is-macos macos linux)
PATH := $(DOTFILES_DIR)/bin:$(PATH)
NVM_DIR := $(HOME)/.nvm
NODENV_DIR := $(HOME)/.nodenv
export XDG_CONFIG_HOME := $(HOME)/.config
export STOW_DIR := $(DOTFILES_DIR)

Expand All @@ -14,7 +14,7 @@ macos: sudo core-macos packages link

linux: core-linux link

core-macos: brew bash git npm ruby
core-macos: brew zsh git npm ruby

core-linux:
apt-get update
Expand Down Expand Up @@ -47,17 +47,16 @@ unlink: stow-$(OS)
brew:
is-executable brew || curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | ruby

bash: BASH=/usr/local/bin/bash
bash: SHELLS=/private/etc/shells
bash: brew
if ! grep -q $(BASH) $(SHELLS); then brew install bash bash-completion@2 pcre && sudo append $(BASH) $(SHELLS) && chsh -s $(BASH); fi
zsh: ZSH=/usr/local/bin/zsh
zsh: SHELLS=/private/etc/shells
zsh: brew
if ! grep -q $(ZSH) $(SHELLS); then brew install zsh pcre && sudo append $(ZSH) $(SHELLS) && chsh -s $(ZSH); fi

git: brew
brew install git git-extras

npm:
if ! [ -d $(NVM_DIR)/.git ]; then git clone https://github.com/creationix/nvm.git $(NVM_DIR); fi
. $(NVM_DIR)/nvm.sh; nvm install --lts
npm: brew
if ! [ -d $(NODENV_DIR) ]; then (export PATH="$HOME/.nodenv/shims:$PATH"; curl -fsSL https://raw.githubusercontent.com/nodenv/nodenv-installer/master/bin/nodenv-installer | bash); fi

ruby: brew
brew install ruby
Expand All @@ -67,11 +66,10 @@ brew-packages: brew

cask-apps: brew
brew bundle --file=$(DOTFILES_DIR)/install/Caskfile
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"
for EXT in $$(cat install/Codefile); do code --install-extension $$EXT; done

node-packages: npm
. $(NVM_DIR)/nvm.sh; npm install -g $(shell cat install/npmfile)
. npm install -g $(shell cat install/npmfile)

gems: ruby
export PATH="/usr/local/opt/ruby/bin:$PATH"; gem install $(shell cat install/Gemfile)
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# .files
# dotfiles

These are my dotfiles. Take anything you want, but at your own risk.

Expand All @@ -11,9 +11,8 @@ It targets macOS systems, but it should work on \*nix as well (with `apt-get`).
- [Node.js + npm LTS](https://nodejs.org/en/download/) (packages: [npmfile](./install/npmfile))
- Latest Ruby (packages: [Gemfile](./install/Gemfile))
- Latest Git, Bash 4, Python 3, GNU coreutils, curl
- [Hammerspoon](https://www.hammerspoon.org) (config: [keybindings & window management](./config/hammerspoon))
- [Mackup](https://github.com/lra/mackup) (sync application settings)
- `$EDITOR` (and Git editor) is [GNU nano](https://www.nano-editor.org)
- `$EDITOR` (and Git editor) is [VS Code](https://code.visualstudio.com/)

## Install

Expand All @@ -25,23 +24,23 @@ On a sparkling fresh installation of macOS:
The Xcode Command Line Tools includes `git` and `make` (not available on stock macOS).
Then, install this repo with `curl` available:

bash -c "`curl -fsSL https://raw.githubusercontent.com/webpro/dotfiles/master/remote-install.sh`"
bash -c "`curl -fsSL https://raw.githubusercontent.com/lumaxis/dotfiles/master/remote-install.sh`"

This will clone (using `git`), or download (using `curl` or `wget`), this repo to `~/.dotfiles`. Alternatively, clone manually into the desired location:
This will clone (using `git`), or download (using `curl` or `wget`), this repo to `~/dotfiles`. Alternatively, clone manually into the desired location:

git clone https://github.com/webpro/dotfiles.git ~/.dotfiles
git clone https://github.com/lumaxis/dotfiles.git ~/dotfiles

Use the [Makefile](./Makefile) to install everything [listed above](#package-overview), and symlink [runcom](./runcom) and [config](./config) (using [stow](https://www.gnu.org/software/stow/)):

cd ~/.dotfiles
cd ~/dotfiles
make

## Post-install

- `dotfiles dock` (set [Dock items](./macos/dock.sh))
- `dotfiles macos` (set [macOS defaults](./macos/defaults.sh))
- Mackup
- Log in to Dropbox (and wait until synced)
- Log in to iCloud (and wait until synced)
- `ln -s ~/.config/mackup/.mackup.cfg ~` (until [#632](https://github.com/lra/mackup/pull/632) is fixed)
- `mackup restore`

Expand All @@ -51,7 +50,7 @@ Use the [Makefile](./Makefile) to install everything [listed above](#package-ove
Usage: dotfiles <command>

Commands:
clean Clean up caches (brew, npm, gem, rvm)
clean Clean up caches (brew, gem)
dock Apply macOS Dock settings
edit Open dotfiles in IDE (code) and Git GUI (stree)
help This help message
Expand Down
3 changes: 1 addition & 2 deletions bin/dotfiles
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sub_help () {
echo "Usage: $BIN_NAME <command>"
echo
echo "Commands:"
echo " clean Clean up caches (brew, nvm, gem)"
echo " clean Clean up caches (brew, gem)"
echo " dock Apply macOS Dock settings"
echo " edit Open dotfiles in IDE ($DOTFILES_IDE) and Git GUI ($DOTFILES_GIT_GUI)"
echo " help This help message"
Expand Down Expand Up @@ -39,7 +39,6 @@ sub_update () {
sub_clean () {
brew cleanup
gem cleanup
. "$NVM_DIR/nvm.sh"; nvm cache clear
}

sub_macos () {
Expand Down
102 changes: 34 additions & 68 deletions config/git/config
Original file line number Diff line number Diff line change
@@ -1,101 +1,67 @@
[user]
name = Lars Kappert
email = [email protected]
name = Lukas Spieß
email = [email protected]

[github]
user = webpro
user = lumaxis

[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --

[core]
excludesfile = ~/.config/git/ignore
editor = nano
filemode = false
trustctime = false
editor = code-insiders --wait
autocrlf = input
untrackedCache = true
pager = diff-so-fancy | less --tabs=4 -RFX
trustctime = false
excludesfile = /Users/lukas/.gitignore_global

[init]
templatedir = ~/.git_template

[credential]
helper = osxkeychain

[grep]
lineNumber = true

[help]
autocorrect = 1
[commit]
gpgSign = true

[push]
default = simple
followTags = true
[gpg]
program = /usr/local/bin/krgpg

[fetch]
prune = true

[alias]
amend = commit --amend --reuse-message=HEAD
br = branch
ci = commit
co = checkout
contrib = shortlog --summary --numbered
cr = clone --recursive
df = diff --word-diff
g = grep --break --heading --line-number
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ld = "!sh -c \"git log --since '${1:-1} days ago' --oneline --author $(git config user.email)\" -"
lg = log -p
ll = log --pretty=oneline --graph --abbrev-commit
lm = log --pretty=format:'* %s (%h)'
patch = !git --no-pager diff --no-color
p = push
pf = push --force
pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
show-ignored = "! git clean -ndX | perl -pe 's/Would remove/Ignored:/'"
st = status
stl = ls-files -m -o --exclude-standard
sts = status -sb
unstage = reset --hard HEAD
[rerere]
enabled = true

[tag]
forceSignAnnotated = true

[pack]
useSparse = true

[diff]
renames = copies
indentHeuristic = true
compactionHeuristic = true
tool = Kaleidoscope

[difftool]
prompt = false

[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool "sourcetree"]
cmd = ksdiff -w \"$LOCAL\" \"$REMOTE\"
path =

[merge]
tool = Kaleidoscope
conflictstyle = diff3
defaultToUpstream = true
[mergetool]
prompt = false
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[mergetool "sourcetree"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true

[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
trustexitcode = true

[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
1 change: 0 additions & 1 deletion config/git/ignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
.idea
.vscode
node_modules
bower_components
npm-debug.log
42 changes: 0 additions & 42 deletions config/hammerspoon/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions config/hammerspoon/apps.lua

This file was deleted.

36 changes: 0 additions & 36 deletions config/hammerspoon/grid.lua

This file was deleted.

9 changes: 0 additions & 9 deletions config/hammerspoon/init.lua

This file was deleted.

Loading

0 comments on commit 8507367

Please sign in to comment.