176 lines
4.2 KiB
Bash
Executable File
176 lines
4.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
[ -n "${DEBUG-}" ] && set -x
|
|
|
|
cd "$(dirname "$0")" || exit 1
|
|
|
|
shellcheck "$0" || exit 1
|
|
shfmt -i 2 -d -s "$0"
|
|
|
|
mkdir -p "$HOME/.config"
|
|
|
|
cat <<EOF >"$HOME/.wezterm.lua"
|
|
local wezterm = require 'wezterm'
|
|
local config = {}
|
|
|
|
if wezterm.config_builder then
|
|
config = wezterm.config_builder()
|
|
end
|
|
|
|
config.font = wezterm.font_with_fallback({
|
|
{ family = 'Operator Mono', weight = 'Book' },
|
|
'Symbols Nerd Font'
|
|
})
|
|
config.font_size = 22.0
|
|
-- config.color_scheme = 'One Light (base16)'
|
|
-- config.color_scheme = 'Material Darker (base16)'
|
|
-- config.color_scheme = 'Belge (terminal.sexy)'
|
|
-- config.color_scheme = 'GJM (terminal.sexy)'
|
|
-- config.color_scheme = 'Helios (base16)'
|
|
-- config.color_scheme = 'Synth Midnight Terminal Dark (base16)'
|
|
config.color_scheme = 'Windows 10 (base16)'
|
|
config.window_background_opacity = 0.9
|
|
config.initial_rows = 30
|
|
config.initial_cols = 120
|
|
config.use_fancy_tab_bar = false
|
|
config.mouse_bindings = {
|
|
{
|
|
event = { Up = { streak = 1, button = 'Left' } },
|
|
mods = 'CTRL',
|
|
action = wezterm.action.OpenLinkAtMouseCursor,
|
|
},
|
|
}
|
|
config.keys = {
|
|
-- Make Ctrl-b equivalent to Alt-b which many line editors interpret as backward-word
|
|
{key="b", mods="CTRL", action=wezterm.action{SendString="\x1bb"}},
|
|
-- Make Ctrl-f equivalent to Alt-f which many line editors interpret as forward-word
|
|
{key="f", mods="CTRL", action=wezterm.action{SendString="\x1bf"}},
|
|
}
|
|
|
|
return config
|
|
EOF
|
|
|
|
cat <<EOF >"$HOME/.config/starship.toml"
|
|
[container]
|
|
disabled=true
|
|
EOF
|
|
|
|
mkdir -p "$HOME/.config/helix/themes"
|
|
cat <<EOF >"$HOME/.config/helix/config.toml"
|
|
theme = "Molokai"
|
|
|
|
[editor]
|
|
true-color = true
|
|
color-modes = true
|
|
idle-timeout = 75
|
|
mouse = false
|
|
bufferline = "multiple"
|
|
auto-pairs = false
|
|
|
|
[editor.indent-guides]
|
|
render = true
|
|
|
|
[editor.cursor-shape]
|
|
insert = "bar"
|
|
normal = "block"
|
|
select = "underline"
|
|
|
|
[editor.whitespace.render]
|
|
tab = "all"
|
|
|
|
[editor.soft-wrap]
|
|
enable = true
|
|
EOF
|
|
|
|
curl -sLo "$HOME/.config/themes.gitconfig" "https://raw.githubusercontent.com/dandavison/delta/main/themes.gitconfig"
|
|
cat <<EOF >"$HOME/.gitconfig"
|
|
[include]
|
|
path = "~/.config/themes.gitconfig"
|
|
|
|
[push]
|
|
default = simple
|
|
|
|
[user]
|
|
name = Andrew Coleman
|
|
email = penguincoder@gmail.com
|
|
|
|
[advice]
|
|
detachedHead = false
|
|
|
|
[core]
|
|
filemode = true
|
|
eol = lf
|
|
autocrlf = input
|
|
pager = delta
|
|
|
|
[init]
|
|
defaultBranch = main
|
|
|
|
[delta]
|
|
line-numbers = true
|
|
file-style = omit
|
|
hunk-header-style = file
|
|
features = calochortus-lyallii
|
|
|
|
[rebase]
|
|
autoStash = true
|
|
|
|
[merge]
|
|
tool = vimdiff
|
|
conflictstyle = diff3
|
|
prompt = false
|
|
|
|
[pull]
|
|
rebase = true
|
|
|
|
[color]
|
|
branch = auto
|
|
diff = auto
|
|
status = auto
|
|
ui = true
|
|
|
|
[color "branch"]
|
|
current = yellow reverse
|
|
local = yellow
|
|
remote = green
|
|
|
|
[color "status"]
|
|
added = yellow
|
|
changed = green
|
|
untracked = red
|
|
|
|
[alias]
|
|
logp = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
|
|
lg = log --graph --date-order --first-parent \
|
|
--pretty=format:'%C(auto)%h%Creset %C(auto)%d%Creset %s %C(green)(%ad) %C(bold cyan)<%an>%Creset'
|
|
lgb = log --graph --date-order --branches --first-parent \
|
|
--pretty=format:'%C(auto)%h%Creset %C(auto)%d%Creset %s %C(green)(%ad) %C(bold cyan)<%an>%Creset'
|
|
lga = log --graph --date-order --all \
|
|
--pretty=format:'%C(auto)%h%Creset %C(auto)%d%Creset %s %C(green)(%ad) %C(bold cyan)<%an>%Creset'
|
|
up = pull --rebase
|
|
branches-last-updated = branch -rv --sort=committerdate --format='%(HEAD) %(color:green)%(committerdate:relative)%(color:reset)\t%(color:magenta)%(authorname)%(color:reset)\t%(color:yellow)%(refname:short)%(color:reset)'
|
|
EOF
|
|
|
|
cat <<EOF >"$HOME/.tmux.conf"
|
|
set-option -g update-environment "SSH_AUTH_SOCK SSH_CONNECTION"
|
|
EOF
|
|
|
|
cat <<EOF >"$HOME/.vimrc"
|
|
" gratis https://swordandsignals.com/2020/12/13/5-lines-in-vimrc.html
|
|
set hlsearch " highlight all search results
|
|
set ignorecase " do case insensitive search
|
|
set incsearch " show incremental search results as you type
|
|
set number " display line number
|
|
set noswapfile " disable swap file
|
|
" can also be summarized as
|
|
set hls ic is nu noswf
|
|
" from https://www.guckes.net/vim/setup.html
|
|
set ai nocp ek hid ru sc vb wmnu noeb noet nosol
|
|
set bs=2 fo=cqrt ls=2 shm=at ww=<,>,h,l
|
|
set comments=b:#,:%,n:>
|
|
set list listchars=tab:>=,trail:-
|
|
set viminfo=%,'50,\"100,:100,n~/.viminfo
|
|
EOF
|
|
|
|
install -m 640 ./.zshrc "$HOME/"
|