Compare commits

..

No commits in common. "2741ae520bf93a08686c8385aca94db40ce886da" and "e23e66f801b0549d6195d7115ed6f033ed4318e6" have entirely different histories.

7 changed files with 13 additions and 159 deletions

View file

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

15
.bashrc
View file

@ -147,10 +147,6 @@ fi
# Customizations # Customizations
if [ -f ~/.profile ]; then
. ~/.profile
fi
# Use tmux for local unelevated shells # Use tmux for local unelevated shells
if [ -z "${SUDO_USER}" ] && [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then if [ -z "${SUDO_USER}" ] && [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then
tmux new -A -s local_tmux tmux new -A -s local_tmux
@ -165,10 +161,15 @@ if [ $(which nvim) ]; then
fi fi
# Kubernetes # Kubernetes
alias k9=k9s
which kubectl 1> /dev/null && source <(kubectl completion bash) which kubectl 1> /dev/null && source <(kubectl completion bash)
which helm 1> /dev/null && source <(helm 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 # Helpful Aliases
alias rsync="rsync -e 'ssh -o RemoteCommand=none'"
alias sudosu="sudo bash --rcfile ~/.bashrc"
if [ -n "${SUDO_USER}" ]; then if [ -n "${SUDO_USER}" ]; then
alias nano="nano --rcfile \"/home/${SUDO_USER}/.nanorc\"" alias nano="nano --rcfile \"/home/${SUDO_USER}/.nanorc\""
fi fi
@ -177,6 +178,12 @@ fi
shopt -s histverify shopt -s histverify
PROMPT_COMMAND="${PROMPT_COMMAND};history -a" 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 # Apply local .bashrc to remote ssh session
ssh-custom() { ssh-custom() {
remote_file=$(mktemp) remote_file=$(mktemp)

View file

@ -23,13 +23,12 @@ require("config.lazy")
local builtin = require("telescope.builtin") local builtin = require("telescope.builtin")
vim.keymap.set("n", "<C-p>", builtin.find_files, {}) vim.keymap.set("n", "<C-p>", builtin.find_files, {})
vim.keymap.set("n", "<leader>gg", builtin.live_grep, { desc = "Grep Files" }) vim.keymap.set("n", "<leader>gg", builtin.live_grep, { desc = "Grep Files" })
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Open Editors" })
-- Init Treesitter Syntax Highlighting -- Init Treesitter Syntax Highlighting
--require("config.treesitter") --require("config.treesitter")
-- Configure NeoTree (FS View) -- Configure NeoTree (FS View)
vim.keymap.set("n", "<leader>ft", ":Neotree filesystem reveal left<CR>") vim.keymap.set("n", "<leader>f", ":Neotree filesystem reveal left<CR>")
-- Configure Git -- Configure Git
vim.keymap.set("n", "<leader>gd", ":Gitsigns preview_hunk<CR>", { desc = "Git Diff" }) vim.keymap.set("n", "<leader>gd", ":Gitsigns preview_hunk<CR>", { desc = "Git Diff" })

View file

@ -1,7 +0,0 @@
return {
"romgrk/barbar.nvim",
tag = "v1.9.0",
--init = function()
-- vim.g.barbar_auto_setup = false
--end,
}

2
.gitignore vendored
View file

@ -1,3 +1,3 @@
.config/nvim/lazy-lock.json nvim/lazy-lock.json
.luarc.json .luarc.json
.tmux/plugins/* .tmux/plugins/*

View file

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

107
.zshrc
View file

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