From 857ee59e095490a97a5e163dbbf288c454c71400 Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Wed, 4 Dec 2024 08:24:44 -0500 Subject: [PATCH] cleanup obsolete settings --- bash/.bash_profile | 4 ++-- bash/.bashrc | 3 +-- install.sh | 15 ++++++++++----- shellenv/.functions | 4 ++++ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/bash/.bash_profile b/bash/.bash_profile index 7fd6523..b68f9ea 100644 --- a/bash/.bash_profile +++ b/bash/.bash_profile @@ -17,7 +17,7 @@ shopt -s histappend shopt -s cdspell # solarized directory color listings -eval `dircolors $HOME/.dir_colors` +# eval `dircolors $HOME/.dir_colors` # tmuxifier -eval "$(starship init bash)" +# eval "$(starship init bash)" diff --git a/bash/.bashrc b/bash/.bashrc index 43969ea..478aed5 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -44,8 +44,7 @@ fi # work around for fzf set -o vi -[ -f ~/.fzf.bash ] && source ~/.fzf.bash - +eval "$(fzf --bash)" # tmuxifier eval "$(tmuxifier init -)" diff --git a/install.sh b/install.sh index a449696..8aad8e8 100755 --- a/install.sh +++ b/install.sh @@ -20,11 +20,13 @@ if [[ -f /etc/os-release ]]; then echo "Running on debian-family.." package_manager=apt vim="vim-nox" + ansible="ansible" ;; fedora) - echo "Running on debian-family.." - package_manager=fedora + echo "Running on rpm-family.." + package_manager=dnf vim="vim-enhanced" + ansible="ansible-core" esac else echo "You are running an unrecognized family of os. Quitting..." @@ -34,10 +36,12 @@ fi # could have used a case, but i prefer the if statement if [[ -z "$1" ]]; then echo "Installing packages" - sudo "$package_manager" install -y "$vim" git stow curl ranger tmux + sudo "$package_manager" install -y "$vim" git stow curl ranger tmux "$ansible" + # backup current configs + mv ~/.bashrc ~/.bashrc.bak;mv ~/.bash_profile ~/.bash_profile.bak # use gnu stow to symlink config files to home directory - stow bash git ranger shellenv tmux vim + stow bash ranger shellenv tmux vim elif [[ undo = "$1" ]]; then echo "undoing" @@ -52,4 +56,5 @@ elif [[ "$1" = "help" ]]; then usage fi - +# extras for tmux +[[ -f ~/.tmux/plugins/tpm ]] || git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm diff --git a/shellenv/.functions b/shellenv/.functions index 5ef65fa..07aeeec 100644 --- a/shellenv/.functions +++ b/shellenv/.functions @@ -14,3 +14,7 @@ pdfmerge() { gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTTINGS=/prepress\ -sOutputFile=$@ ; } + +apdoc () { + ansible-doc $1 | grep EXAMPLES -A 100 | less +}