dotfiles
shell, editor, ssh.
git clone https://owenrusk.dev/dotfiles.git
commit ee6167325616681bd8b9b1ba8c23838225d143e4 author Owen Rusk <owen@papermothgames.com> date 2024-03-04 19:12:40 -0600
fresh start new machine, new studio. the old setup stays where it was.
| README.md | +3 | -0 |
| git/config | +25 | -0 |
| install.sh | +13 | -0 |
| zsh/zshenv | +8 | -0 |
| zsh/zshrc | +25 | -0 |
diff --git a/README.md b/README.md new file mode 100644 index 0000000..41c39de --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# dotfiles + +my shell and editor setup. clone it to ~/src/dotfiles and run ./install.sh. diff --git a/git/config b/git/config new file mode 100644 index 0000000..c5a9960 --- /dev/null +++ b/git/config @@ -0,0 +1,25 @@ +[user] + name = Owen Rusk + email = owen@papermothgames.com +[init] + defaultBranch = main +[core] + editor = nvim +[pull] + ff = only +[push] + default = current + autoSetupRemote = true +[fetch] + prune = true +[alias] + st = status -sb + co = checkout + sw = switch + ci = commit + amend = commit --amend --no-edit + lg = log --graph --format='%C(yellow)%h%Creset %s %C(dim)%ar%Creset' + last = log -1 --stat + unstage = restore --staged +[include] + path = ~/.config/git/local diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..666ce09 --- /dev/null +++ b/install.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# symlink everything into place. safe to run twice. +set -eu +here=$(cd "$(dirname "$0")" && pwd) + +link() { + mkdir -p "$(dirname "$2")" + ln -sfn "$here/$1" "$2" +} + +link zsh/zshenv "$HOME/.zshenv" +link zsh/zshrc "$HOME/.zshrc" +link git/config "$HOME/.config/git/config" diff --git a/zsh/zshenv b/zsh/zshenv new file mode 100644 index 0000000..64516fd --- /dev/null +++ b/zsh/zshenv @@ -0,0 +1,8 @@ +# every zsh reads this, interactive or not. keep it short. +export EDITOR=nvim +export VISUAL=nvim +export PAGER=less +export LESS=-FRX + +typeset -U path +path=(~/.local/bin $path) diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..bf63b62 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,25 @@ +# no framework. it's a shell, not a lifestyle. + +HISTFILE=~/.zsh_history +HISTSIZE=50000 +SAVEHIST=50000 +setopt append_history hist_ignore_dups hist_reduce_blanks extended_history +setopt auto_cd interactive_comments no_beep +unsetopt flow_control # ctrl-s is for searching, not for freezing the terminal + +bindkey -e + +autoload -Uz compinit +compinit -d ~/.cache/zcompdump +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' +zstyle ':completion:*' menu select + +PROMPT='%F{8}%m%f %F{blue}%~%f %(?..%F{red}%?%f )%# ' + +alias ls='ls --color=auto -F' +alias ll='ls -lh' +alias la='ls -lAh' +alias v=nvim +alias g=git + +[[ -r ~/.zshrc.local ]] && source ~/.zshrc.local