Compare commits

...

10 commits

Author SHA1 Message Date
289cbfe53a
Swap to ripgrep (slowly) 2023-02-05 20:18:42 -05:00
a65bd1be66
List changes since last tag 2023-01-31 13:35:16 -05:00
03495ac29f
Add nvim languages 2023-01-06 09:23:29 -05:00
c7543de2b0
Additional installs for work 2023-01-06 09:11:37 -05:00
b1f33b7acb
Add work gitconfig 2022-12-12 09:03:53 -05:00
303b43a939
MacOS fix for tmux terminfo
sourced from https://gpanders.com/blog/the-definitive-guide-to-using-tmux-256color-on-macos/

One day I'll learn how terminfo actually works
2022-12-10 09:56:54 -05:00
fdf329b3df
Prefer USER to USERNAME
USERNAME seems to act weird on MacOS in scripts and nvim conifig
2022-12-10 09:46:21 -05:00
a567fe4f12
Fixes to installer after running on MacOS 2022-12-10 09:28:35 -05:00
2b8c19e26f
Install fzf for zsh 2022-11-22 20:26:02 -05:00
4a005b8f8c
Minor fixes 2022-11-22 20:14:36 -05:00
11 changed files with 87 additions and 18 deletions

View file

@ -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)

View file

@ -0,0 +1,3 @@
[user]
email = andrew@mudflapinc.com
name = Andrew Tomaka

View file

@ -1,3 +0,0 @@
[user]
email = andrew@oak.tech
name = Andrew Tomaka

View file

@ -39,4 +39,4 @@
cachetextconv = false
[includeIf "gitdir:~/Source/work/"]
path = ~/.config/git/gitconfig_oak
path = ~/.config/git/gitconfig_mudflap

View file

@ -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

View file

@ -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({
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({

View file

@ -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()

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"