diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..1ec05b2 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,35 @@ +[user] + email = ava+git@basking.monster + name = gaiety + +[apply] + # Detect whitespace errors when applying a patch + whitespace = fix + +[color] + ui = auto + +[color "diff"] + meta = yellow bold + frag = magenta bold # line info + old = red # deletions + new = green # additions + +[color "status"] + added = yellow + changed = green + untracked = cyan + +[diff] + # Detect copies as well as renames + renames = copies + tool = difft + +[help] + # Automatically correct and execute mistyped commands + autocorrect = 1 + +[push] + # change to maching for machines with older versions of git 1.x.x + default = simple + autoSetupRemote = true diff --git a/.zshrc b/.zshrc index e38429f..49d943d 100644 --- a/.zshrc +++ b/.zshrc @@ -305,7 +305,7 @@ ENABLE_CORRECTION="true" # Add wisely, as too many plugins slow down shell startup. MAGIC_ENTER_GIT_COMMAND='git status -u . | bat --style=plain -l=sh' MAGIC_ENTER_OTHER_COMMAND='ls -lh . | bat --paging=never -l=ls' -plugins=(git gh rake rails ssh mise mix bun docker docker-compose magic-enter sudo) +plugins=(git gh rake zsh-autosuggestions rails ssh mise mix bun docker docker-compose magic-enter sudo) source $ZSH/oh-my-zsh.sh @@ -337,3 +337,7 @@ export EDITOR='nvim' # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" + +. "$HOME/.atuin/bin/env" + +eval "$(atuin init zsh)" diff --git a/Taskfile.yml b/Taskfile.yml index 285bb11..ded0e97 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -23,15 +23,10 @@ tasks: tools: - deps: [zsh, kitty, ripgrep, neovim, bat, zoxide] + deps: [git, zsh, kitty, ripgrep, neovim, bat, zoxide] cmds: - echo "tools installed" - kitty: - cmds: # installed via ./setup.sh - - cmd: ln -s "$(pwd)/kitty" ~/.config/kitty - ignore_error: true - zsh: cmds: # installed via ./setup.sh - cmd: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" @@ -41,6 +36,16 @@ tasks: - cmd: ln -s "$(pwd)/.zshrc" ~/.zshrc ignore_error: true + kitty: + cmds: # installed via ./setup.sh + - cmd: ln -s "$(pwd)/kitty" ~/.config/kitty + ignore_error: true + + git: + cmds: + - cmd: ln -s "$(pwd)/.gitconfig" ~/.gitconfig + ignore_error: true + ripgrep: cmds: - mise use --global ripgrep@latest diff --git a/difft.tar.gz b/difft.tar.gz new file mode 100644 index 0000000..805dcb3 Binary files /dev/null and b/difft.tar.gz differ diff --git a/setup.sh b/setup.sh index 99fc0b3..2e386be 100644 --- a/setup.sh +++ b/setup.sh @@ -3,6 +3,7 @@ echo Installing ZSH sudo apt install zsh chsh -s $(which zsh) +git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions echo ZSH installed, log out then back in to have it be your default shell echo then run this script again @@ -26,4 +27,12 @@ echo ranger installed, set it as your default file manager if you wish sudo apt install mosh echo mosh installed +curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh +atuin import auto +echo Atuin installed + +wget -qO difft.tar.gz https://github.com/Wilfred/difftastic/releases/latest/download/difft-x86_64-unknown-linux-gnu.tar.gz +sudo tar xf difft.tar.gz -C /usr/local/bin +echo difftastic installed + echo Finally, run 'task' whenever you are ready for the remaining setup