diff --git a/.bash_aliases b/.bash_aliases deleted file mode 100644 index 21f9eee..0000000 --- a/.bash_aliases +++ /dev/null @@ -1,5 +0,0 @@ -alias k9=k9s -alias rsync="rsync -e 'ssh -o RemoteCommand=none'" -alias sudosu="sudo bash --rcfile ~/.bashrc" -alias bell="echo -e '\a'" - diff --git a/.bashrc b/.bashrc index f471061..7bf0b99 100644 --- a/.bashrc +++ b/.bashrc @@ -147,10 +147,6 @@ fi # Customizations -if [ -f ~/.profile ]; then - . ~/.profile -fi - # Use tmux for local unelevated shells if [ -z "${SUDO_USER}" ] && [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then tmux new -A -s local_tmux @@ -165,10 +161,15 @@ if [ $(which nvim) ]; then fi # Kubernetes +alias k9=k9s which kubectl 1> /dev/null && source <(kubectl completion bash) which helm 1> /dev/null && source <(helm completion bash) +[ -d "${KREW_ROOT:-$HOME/.krew}/bin" ] && export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" # Helpful Aliases +alias rsync="rsync -e 'ssh -o RemoteCommand=none'" +alias sudosu="sudo bash --rcfile ~/.bashrc" + if [ -n "${SUDO_USER}" ]; then alias nano="nano --rcfile \"/home/${SUDO_USER}/.nanorc\"" fi @@ -177,6 +178,12 @@ fi shopt -s histverify PROMPT_COMMAND="${PROMPT_COMMAND};history -a" +# Cargo binary path +[ -d "${HOME}/.cargo/bin" ] && export PATH="${PATH}:${HOME}/.cargo/bin" + +# Funciton to notify after a long-running command +alias bell="echo -e '\a'" + # Apply local .bashrc to remote ssh session ssh-custom() { remote_file=$(mktemp) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index f0938b8..376047a 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -23,13 +23,12 @@ require("config.lazy") local builtin = require("telescope.builtin") vim.keymap.set("n", "", builtin.find_files, {}) vim.keymap.set("n", "gg", builtin.live_grep, { desc = "Grep Files" }) -vim.keymap.set("n", "fb", builtin.buffers, { desc = "Open Editors" }) -- Init Treesitter Syntax Highlighting --require("config.treesitter") -- Configure NeoTree (FS View) -vim.keymap.set("n", "ft", ":Neotree filesystem reveal left") +vim.keymap.set("n", "f", ":Neotree filesystem reveal left") -- Configure Git vim.keymap.set("n", "gd", ":Gitsigns preview_hunk", { desc = "Git Diff" }) diff --git a/.config/nvim/lua/plugins/barbar.lua b/.config/nvim/lua/plugins/barbar.lua deleted file mode 100644 index 50f47ff..0000000 --- a/.config/nvim/lua/plugins/barbar.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "romgrk/barbar.nvim", - tag = "v1.9.0", - --init = function() - -- vim.g.barbar_auto_setup = false - --end, -} diff --git a/.gitignore b/.gitignore index 49ab2dc..01a9d7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -.config/nvim/lazy-lock.json +nvim/lazy-lock.json .luarc.json .tmux/plugins/* diff --git a/.profile b/.profile deleted file mode 100644 index f1ff09c..0000000 --- a/.profile +++ /dev/null @@ -1,33 +0,0 @@ -# ~/.profile: executed by the command interpreter for login shells. -# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login -# exists. -# see /usr/share/doc/bash/examples/startup-files for examples. -# the files are located in the bash-doc package. - -# the default umask is set in /etc/profile; for setting the umask -# for ssh logins, install and configure the libpam-umask package. -#umask 022 - -# set PATH so it includes user's private bin if it exists -if [ -d "$HOME/bin" ] ; then - PATH="$HOME/bin:$PATH" -fi - -# set PATH so it includes user's private bin if it exists -if [ -d "$HOME/.local/bin" ] ; then - PATH="$HOME/.local/bin:$PATH" -fi - -if [ -d "$HOME/.cargo/bin" ] ; then - PATH="$HOME/.cargo/bin:$PATH" -fi - -if [ -d "${KREW_ROOT:-$HOME/.krew}/bin" ] ; then - PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" -fi - -# Set nvim as the preferred editor if available -if [ $(which nvim) ]; then - export EDITOR=nvim -fi - diff --git a/.zshrc b/.zshrc deleted file mode 100644 index 1d04ca5..0000000 --- a/.zshrc +++ /dev/null @@ -1,107 +0,0 @@ -# Lines configured by zsh-newuser-install -HISTFILE=~/.histfile -HISTSIZE=1000 -SAVEHIST=1000 -setopt autocd notify -unsetopt beep -bindkey -v -# End of lines configured by zsh-newuser-install - -# SSH completion -zstyle ':completion:*:(ssh|scp|ftp|sftp|rsync):*' hosts $hosts - -# The following lines were added by compinstall -zstyle :compinstall filename '/home/d_mcknight/.zshrc' - -autoload -Uz compinit -compinit -# End of lines added by compinstall - -# Source common envvars -[ -f ~/.profile ] && source ~/.profile - -# Prompt -function precmd { - # Check previous command output and notify - if [[ $? != 0 && $? != 130 ]];then - echo -e "⚠️\a" - else - echo -e "\a" - fi - - if [ "$EUID" -eq 0 ];then - chrome_color="{red}" - else - chrome_color="{magenta}" - fi - - # Static prefix - prefix="%F$chrome_color┌──[%F{cyan}%n%F$chrome_color@%F{cyan}%m%F$chrome_color]-" - - # Calculate extra path - if [[ ${debian_chroot} ]]; then - path_extra="(%F{red}${debian_chroot}%F$chrome_color)-" - elif [[ ${VIRTUAL_ENV} ]]; then - rel_venv=$(realpath $VIRTUAL_ENV --relative-to $PWD --relative-base /home) - path_extra="[%F{blue}${rel_venv}%F$chrome_color]-" - else; - path_extra="" - fi - - # Static suffix - suffix="(%F{blue}%~%F${chrome_color})"$'\n'"└%F{cyan}%#%F{white} " - - PROMPT=$prefix$path_extra$suffix - PS2="%F$chrome_color└%F{cyan}>%F{white} " -} - -# Aliases -alias .=source -alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' -alias k9=k9s -alias rsync="rsync -e 'ssh -o RemoteCommand=none'" -alias sudosu="sudo ZDOTDIR=$(dirname ${0:a}) zsh" -alias ll='ls -alFh' -alias ls="ls --color=auto" -alias lsl="ls --color=auto -lah" -alias ssh=ssh -# Use tmux for local unelevated shells -if [ -z "${SUDO_USER}" ] && [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then - tmux new -A -s local_tmux -fi - -# Custom dircolors -[ -f ~/.dircolors ] && eval "$(dircolors ~/.dircolors)" - -# Kubernetes Completion -which kubectl 1> /dev/null && source <(kubectl completion zsh) -which helm 1> /dev/null && source <(helm completion zsh) - -# Start in the home directory -cd ~ - -# Ensure zinit is installed -ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" -[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)" -[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" -source "${ZINIT_HOME}/zinit.zsh" - -# Load zinit plugins -zinit snippet OMZP::extract -zinit snippet OMZP::colored-man-pages -zinit snippet OMZP::encode64 -zinit snippet OMZP::gh -zinit snippet OMZP::pip -zinit snippet OMZP::sudo - -zinit light zsh-users/zsh-autosuggestions -zinit light zsh-users/zsh-syntax-highlighting - -# Key bindings config -KEYTIMEOUT=5 -# ^[ for esc; ^I for tab -bindkey '^[' autosuggest-accept - -## Explicitly exit ok -#echo "" > /dev/null -