Compare commits
10 commits
8ef10b05ac
...
289cbfe53a
Author | SHA1 | Date | |
---|---|---|---|
289cbfe53a | |||
a65bd1be66 | |||
03495ac29f | |||
c7543de2b0 | |||
b1f33b7acb | |||
303b43a939 | |||
fdf329b3df | |||
a567fe4f12 | |||
2b8c19e26f | |||
4a005b8f8c |
11 changed files with 87 additions and 18 deletions
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
color_file=$HOME/.config/$USERNAME/color.yml
|
||||
color_file=$HOME/.config/$USER/color.yml
|
||||
if ! test -f $color_file; then
|
||||
mkdir -p $HOME/.config/$USERNAME
|
||||
mkdir -p $HOME/.config/$USER
|
||||
echo light > $color_file
|
||||
fi
|
||||
old_color=$(cat $color_file)
|
||||
|
|
3
git/.config/git/gitconfig_mudflap
Normal file
3
git/.config/git/gitconfig_mudflap
Normal file
|
@ -0,0 +1,3 @@
|
|||
[user]
|
||||
email = andrew@mudflapinc.com
|
||||
name = Andrew Tomaka
|
|
@ -1,3 +0,0 @@
|
|||
[user]
|
||||
email = andrew@oak.tech
|
||||
name = Andrew Tomaka
|
|
@ -39,4 +39,4 @@
|
|||
cachetextconv = false
|
||||
|
||||
[includeIf "gitdir:~/Source/work/"]
|
||||
path = ~/.config/git/gitconfig_oak
|
||||
path = ~/.config/git/gitconfig_mudflap
|
||||
|
|
45
install.sh
45
install.sh
|
@ -16,9 +16,10 @@ install_homebrew() {
|
|||
install_shared_applications() {
|
||||
brew install direnv fzf git stow the_silver_searcher tmux \
|
||||
vim zsh rbenv ruby-build tfenv nodenv node-build tig libpq gnupg llvm \
|
||||
awscli cmake jq watch gh nvim openssl@1.1 openssl@3 readline libyaml gmp
|
||||
awscli cmake jq watch gh nvim openssl@1.1 openssl@3 readline libyaml gmp \
|
||||
pyenv ripgrep
|
||||
|
||||
install_alacritty_terminfo
|
||||
install_fzf
|
||||
install_rust
|
||||
install_vim
|
||||
}
|
||||
|
@ -42,7 +43,7 @@ install_alacritty() {
|
|||
sudo mv /tmp/Alacritty.svg /usr/share/pixmaps/Alacritty.svg
|
||||
sudo desktop-file-install /tmp/Alacritty.desktop
|
||||
sudo update-desktop-database
|
||||
sudo ln -s /home/$USERNAME/.cargo/bin/alacritty /usr/local/bin/alacritty
|
||||
sudo ln -s /home/$USER/.cargo/bin/alacritty /usr/local/bin/alacritty
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -55,10 +56,34 @@ install_alacritty_terminfo() {
|
|||
https://raw.githubusercontent.com/alacritty/alacritty/master/extra/alacritty.info
|
||||
|
||||
sudo tic -xe alacritty,alacritty-direct /tmp/alacritty.info
|
||||
$HOME/dotfiles/bin/bin/toggle-color-mode
|
||||
fi
|
||||
}
|
||||
|
||||
install_tmux_terminfo() {
|
||||
if ! infocmp tmux-256color > /dev/null; then
|
||||
curl \
|
||||
--fail \
|
||||
--location \
|
||||
--output /tmp/tmux-256color.src.gz \
|
||||
https://invisible-island.net/datafiles/current/terminfo.src.gz
|
||||
|
||||
pushd /tmp
|
||||
gunzip tmux-256color.src.gz
|
||||
sed -i 's/pairs#0x10000/pairs#32767/g' tmux-256color.src
|
||||
|
||||
sudo tic -xe tmux-256color tmux-256color.src
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
install_fzf() {
|
||||
$(brew --prefix)/opt/fzf/install \
|
||||
--xdg \
|
||||
--no-update-rc \
|
||||
--key-bindings \
|
||||
--completion
|
||||
}
|
||||
|
||||
install_rust() {
|
||||
if ! command -v rustup > /dev/null; then
|
||||
curl \
|
||||
|
@ -97,20 +122,23 @@ install_linux() {
|
|||
|
||||
# gui
|
||||
install_alacritty
|
||||
install_alacritty_terminfo
|
||||
}
|
||||
|
||||
install_darwin() {
|
||||
install_homebrew
|
||||
sudo mv /etc/{zprofile,zprofile.old}
|
||||
[[ -f /etc/zprofile ]] && sudo mv /etc/{zprofile,zprofile.old}
|
||||
source ~/dotfiles/zsh/.zshenv
|
||||
install_shared_applications
|
||||
|
||||
softwareupdate --install-rosetta
|
||||
softwareupdate --install-rosetta --agree-to-license
|
||||
brew install coreutils gnu-sed session-manager-plugin
|
||||
|
||||
# gui
|
||||
brew install --cask docker rectangle slack google-chrome alacritty telegram \
|
||||
discord element
|
||||
discord element brave-browser zoom notion
|
||||
|
||||
install_tmux_terminfo
|
||||
}
|
||||
|
||||
main() {
|
||||
|
@ -126,7 +154,8 @@ main() {
|
|||
esac
|
||||
|
||||
stow alacritty bin git nvim ruby tmux zsh
|
||||
install_alacritty_terminfo
|
||||
|
||||
$HOME/dotfiles/bin/bin/toggle-color-mode
|
||||
}
|
||||
|
||||
main
|
||||
|
|
|
@ -47,11 +47,28 @@ vim.keymap.set("n", "<Leader>pc", ":PackerClean<CR>")
|
|||
--- telescope.nvim
|
||||
vim.keymap.set("n", "<C-p>", function()
|
||||
require("telescope.builtin").find_files({
|
||||
file_ignore_patterns = {".git/", "node_modules/"},
|
||||
hidden = true,
|
||||
previewer = false,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set('n', '<Leader>ff', function()
|
||||
require("telescope.builtin").find_files({
|
||||
file_ignore_patterns = {".git/", "node_modules/"},
|
||||
hidden = true,
|
||||
no_ignore = true,
|
||||
previewer = false,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set('n', '<Leader>fg', function()
|
||||
require("telescope.builtin").live_grep({
|
||||
file_ignore_patterns = {".git/", "node_modules/"},
|
||||
hidden = true,
|
||||
previewer = false,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set('n', '<Leader>fb', function()
|
||||
require("telescope.builtin").buffers()
|
||||
end)
|
||||
|
||||
--- whitespace.nvim
|
||||
require("whitespace-nvim").setup({
|
||||
|
|
|
@ -36,7 +36,7 @@ vim.api.nvim_create_autocmd({"WinLeave"}, {
|
|||
--- background matching terminal
|
||||
function ChangeBackground()
|
||||
local home = os.getenv("HOME")
|
||||
local user = os.getenv("USERNAME")
|
||||
local user = os.getenv("USER")
|
||||
local file = io.open(home.."/.config/"..user.."/color.yml", "rb")
|
||||
local background = file:read()
|
||||
file:close()
|
||||
|
|
|
@ -2,7 +2,11 @@ local ensure_packer = function()
|
|||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
fn.system({
|
||||
'git', 'clone', '--depth', '1',
|
||||
'https://github.com/wbthomason/packer.nvim',
|
||||
install_path
|
||||
})
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
return true
|
||||
end
|
||||
|
@ -35,6 +39,14 @@ return require('packer').startup(function(use)
|
|||
|
||||
use "gruvbox-community/gruvbox"
|
||||
|
||||
-- languages
|
||||
use "fatih/vim-go"
|
||||
use "hashivim/vim-terraform"
|
||||
use "leafgarland/typescript-vim"
|
||||
use "tpope/vim-markdown"
|
||||
use "tpope/vim-rails"
|
||||
use "vim-ruby/vim-ruby"
|
||||
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
|
|
|
@ -34,6 +34,11 @@ if which nodenv > /dev/null; then
|
|||
(nodenv rehash &) 2> /dev/null
|
||||
fi
|
||||
|
||||
if which pyenv > /dev/null; then
|
||||
eval "$(pyenv init --no-rehash -)"
|
||||
(pyenv rehash &) 2> /dev/null
|
||||
fi
|
||||
|
||||
autoload compinit -Uz
|
||||
setopt EXTENDEDGLOB
|
||||
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.m+1) ]]; then
|
||||
|
@ -43,4 +48,4 @@ else
|
|||
fi
|
||||
unsetopt EXTENDEDGLOB
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
[ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ] && source $XDG_CONFIG_HOME/fzf/fzf.zsh
|
||||
|
|
|
@ -39,6 +39,7 @@ alias gm="git merge"
|
|||
alias gma="git merge --abort"
|
||||
alias gmc="git merge --continue"
|
||||
alias gmr="git most-recent-by-branch"
|
||||
alias gms="git merge --squash"
|
||||
alias gp="git push"
|
||||
alias gpf="git push --force"
|
||||
alias gpl="git pull"
|
||||
|
@ -52,6 +53,7 @@ alias grbi="git rebase --interactive"
|
|||
alias grc="git rm --cached"
|
||||
alias grh="git reset --hard"
|
||||
alias grm="git rm"
|
||||
alias gst="git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline"
|
||||
alias gup="git-branch-delete-merged"
|
||||
alias Grep='grep'
|
||||
alias l="ls"
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
ZDOTDIR=$HOME/.config/zsh
|
||||
|
||||
XDG_CONFIG_HOME="$HOME/.config"
|
||||
|
||||
PERSONAL_BIN_PATH="$HOME/bin"
|
||||
PERSONAL_FPATH="$ZDOTDIR/completions"
|
||||
|
||||
NODENV_PATH="$HOME/.nodenv/bin"
|
||||
RBENV_PATH="$HOME/.rbenv/bin"
|
||||
TFENV_PATH="$HOME/.tfenv/bin"
|
||||
PYENV_PATH="$HOME/.pyenv/bin"
|
||||
|
||||
CARGO_PATH="$HOME/.cargo/bin"
|
||||
|
||||
|
@ -43,6 +46,7 @@ fi
|
|||
[[ -d "$RBENV_PATH" ]] && PATH="$RBENV_PATH:$PATH"
|
||||
[[ -d "$NODENV_PATH" ]] && PATH="$NODENV_PATH:$PATH"
|
||||
[[ -d "$TFENV_PATH" ]] && PATH="$TFENV_PATH:$PATH"
|
||||
[[ -d "$PYENV_PATH" ]] && PATH="$PYENV_PATH:$PATH"
|
||||
[[ -d "$CARGO_PATH" ]] && PATH="$CARGO_PATH:$PATH"
|
||||
[[ -d "$PERSONAL_BIN_PATH" ]] && PATH="$PERSONAL_BIN_PATH:$PATH"
|
||||
[[ -d "$PERSONAL_FPATH" ]] && FPATH="$PERSONAL_FPATH:$FPATH"
|
||||
|
|
Loading…
Add table
Reference in a new issue