From bd8919afb109efa0a92def766aca81f1e2e146fa Mon Sep 17 00:00:00 2001 From: Aaditya Dhruv Date: Sat, 14 Jun 2025 10:12:33 +0530 Subject: Update neovim, neomutt, and shell configurations --- src/config/files/neomutt/mailcap | 1 + src/config/files/neovim/.vimrc | 40 ------------------------ src/config/files/neovim/vimrc | 40 ++++++++++++++++++++++++ src/config/files/shell/.bashrc | 16 ---------- src/config/files/shell/10-export.sh | 11 ------- src/config/files/shell/20-aliases.sh | 7 ----- src/config/files/shell/30-functions.sh | 41 ------------------------- src/config/files/shell/bashrc | 16 ++++++++++ src/config/files/shell/bashrc.d/10-export.sh | 11 +++++++ src/config/files/shell/bashrc.d/20-aliases.sh | 7 +++++ src/config/files/shell/bashrc.d/30-functions.sh | 41 +++++++++++++++++++++++++ 11 files changed, 116 insertions(+), 115 deletions(-) create mode 100644 src/config/files/neomutt/mailcap delete mode 100644 src/config/files/neovim/.vimrc create mode 100644 src/config/files/neovim/vimrc delete mode 100644 src/config/files/shell/.bashrc delete mode 100644 src/config/files/shell/10-export.sh delete mode 100644 src/config/files/shell/20-aliases.sh delete mode 100644 src/config/files/shell/30-functions.sh create mode 100644 src/config/files/shell/bashrc create mode 100644 src/config/files/shell/bashrc.d/10-export.sh create mode 100644 src/config/files/shell/bashrc.d/20-aliases.sh create mode 100644 src/config/files/shell/bashrc.d/30-functions.sh (limited to 'src/config/files') diff --git a/src/config/files/neomutt/mailcap b/src/config/files/neomutt/mailcap new file mode 100644 index 0000000..f93be9a --- /dev/null +++ b/src/config/files/neomutt/mailcap @@ -0,0 +1 @@ +text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput diff --git a/src/config/files/neovim/.vimrc b/src/config/files/neovim/.vimrc deleted file mode 100644 index f74d01b..0000000 --- a/src/config/files/neovim/.vimrc +++ /dev/null @@ -1,40 +0,0 @@ -set rtp+=~/.vim/bundle/Vundle.vim -call vundle#begin() - -set bs=2 -set tabstop=8 -set softtabstop=8 -set textwidth=80 -set shiftwidth=4 smarttab -set expandtab -set t_Co=256 -set number -set ruler - -nnoremap :bp -nnoremap :bn -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" -inoremap coc#pum#visible() ? coc#pum#confirm() : "\" -noremap :Files -map :Lines -noremap :Buffers - -Plugin 'VundleVim/Vundle.vim' -Plugin 'tpope/vim-surround' -Plugin 'airblade/vim-gitgutter' -Plugin 'junegunn/fzf' -Plugin 'junegunn/fzf.vim' -Plugin 'tpope/vim-fugitive' -Plugin 'tpope/vim-obsession' -Plugin 'neoclide/coc.nvim' -Plugin 'sainnhe/gruvbox-material' - -let g:AutoClosePreserveDotReg = 0 -let g:gruvbox_material_background = 'hard' - -set background=dark -colorscheme gruvbox-material -call vundle#end() -filetype plugin indent on -syntax enable diff --git a/src/config/files/neovim/vimrc b/src/config/files/neovim/vimrc new file mode 100644 index 0000000..f74d01b --- /dev/null +++ b/src/config/files/neovim/vimrc @@ -0,0 +1,40 @@ +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +set bs=2 +set tabstop=8 +set softtabstop=8 +set textwidth=80 +set shiftwidth=4 smarttab +set expandtab +set t_Co=256 +set number +set ruler + +nnoremap :bp +nnoremap :bn +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap coc#pum#visible() ? coc#pum#confirm() : "\" +noremap :Files +map :Lines +noremap :Buffers + +Plugin 'VundleVim/Vundle.vim' +Plugin 'tpope/vim-surround' +Plugin 'airblade/vim-gitgutter' +Plugin 'junegunn/fzf' +Plugin 'junegunn/fzf.vim' +Plugin 'tpope/vim-fugitive' +Plugin 'tpope/vim-obsession' +Plugin 'neoclide/coc.nvim' +Plugin 'sainnhe/gruvbox-material' + +let g:AutoClosePreserveDotReg = 0 +let g:gruvbox_material_background = 'hard' + +set background=dark +colorscheme gruvbox-material +call vundle#end() +filetype plugin indent on +syntax enable diff --git a/src/config/files/shell/.bashrc b/src/config/files/shell/.bashrc deleted file mode 100644 index 2161b13..0000000 --- a/src/config/files/shell/.bashrc +++ /dev/null @@ -1,16 +0,0 @@ -# .bashrc - -# Source global definitions -if [ -f /etc/bashrc ]; then - . /etc/bashrc -fi - -# User specific aliases and functions -if [ -d ~/.bashrc.d ]; then - for rc in ~/.bashrc.d/*; do - if [ -f "$rc" ]; then - . "$rc" - fi - done -fi -unset rc diff --git a/src/config/files/shell/10-export.sh b/src/config/files/shell/10-export.sh deleted file mode 100644 index e6c6e28..0000000 --- a/src/config/files/shell/10-export.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -export DISABLE_MAGIC_FUNCTIONS=true -export BROWSER=/usr/bin/firefox -export EDITOR="/usr/bin/nvim" -export PATH="$HOME/.local/bin:$PATH" -export GPG_TTY=$(tty) -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -source <(kubectl completion bash) -source <(fzf --bash) diff --git a/src/config/files/shell/20-aliases.sh b/src/config/files/shell/20-aliases.sh deleted file mode 100644 index cd91c67..0000000 --- a/src/config/files/shell/20-aliases.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -alias vi=nvim -alias k=kubectl -alias tmux="TERM=xterm-256color tmux" -alias note="vi $HOME/Notes/general/\$(get_date).md" -alias get_idf='. $HOME/git/tools/esp-idf/export.sh' diff --git a/src/config/files/shell/30-functions.sh b/src/config/files/shell/30-functions.sh deleted file mode 100644 index e02e8de..0000000 --- a/src/config/files/shell/30-functions.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -get_date() { - date +'%Y-%m-%d' -} - -notebook() { - NEW=0 - NOTEBOOK=$1 - while getopts 'ln:' flag; do - case "${flag}" in - l) ls -1 ~/Notes - return 0 - ;; - n) NEW=1 - NOTEBOOK=${OPTARG} - ;; - *) echo "Invalid flag!" && return 1 ;; - esac - done - if [[ $NEW == 1 && -z "$NOTEBOOK" ]]; then - echo "No notebook name passed!" - return 1 - fi - if [[ $NEW == 1 ]]; then - mkdir -p $HOME/Notes/$NOTEBOOK - fi - if [[ -z "$NOTEBOOK" ]]; then - pushd $HOME/Notes - vi $(find . -type f) - popd - elif [[ ! -z "$NOTEBOOK" ]]; then - if [[ ! -d "${HOME}/Notes/${NOTEBOOK}" ]]; then - echo "No notebook called "$NOTEBOOK"!" - else - pushd $HOME/Notes/$NOTEBOOK - vi $(find . -type f) - popd - fi - fi -} diff --git a/src/config/files/shell/bashrc b/src/config/files/shell/bashrc new file mode 100644 index 0000000..2161b13 --- /dev/null +++ b/src/config/files/shell/bashrc @@ -0,0 +1,16 @@ +# .bashrc + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# User specific aliases and functions +if [ -d ~/.bashrc.d ]; then + for rc in ~/.bashrc.d/*; do + if [ -f "$rc" ]; then + . "$rc" + fi + done +fi +unset rc diff --git a/src/config/files/shell/bashrc.d/10-export.sh b/src/config/files/shell/bashrc.d/10-export.sh new file mode 100644 index 0000000..e6c6e28 --- /dev/null +++ b/src/config/files/shell/bashrc.d/10-export.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +export DISABLE_MAGIC_FUNCTIONS=true +export BROWSER=/usr/bin/firefox +export EDITOR="/usr/bin/nvim" +export PATH="$HOME/.local/bin:$PATH" +export GPG_TTY=$(tty) +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +source <(kubectl completion bash) +source <(fzf --bash) diff --git a/src/config/files/shell/bashrc.d/20-aliases.sh b/src/config/files/shell/bashrc.d/20-aliases.sh new file mode 100644 index 0000000..cd91c67 --- /dev/null +++ b/src/config/files/shell/bashrc.d/20-aliases.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +alias vi=nvim +alias k=kubectl +alias tmux="TERM=xterm-256color tmux" +alias note="vi $HOME/Notes/general/\$(get_date).md" +alias get_idf='. $HOME/git/tools/esp-idf/export.sh' diff --git a/src/config/files/shell/bashrc.d/30-functions.sh b/src/config/files/shell/bashrc.d/30-functions.sh new file mode 100644 index 0000000..e02e8de --- /dev/null +++ b/src/config/files/shell/bashrc.d/30-functions.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +get_date() { + date +'%Y-%m-%d' +} + +notebook() { + NEW=0 + NOTEBOOK=$1 + while getopts 'ln:' flag; do + case "${flag}" in + l) ls -1 ~/Notes + return 0 + ;; + n) NEW=1 + NOTEBOOK=${OPTARG} + ;; + *) echo "Invalid flag!" && return 1 ;; + esac + done + if [[ $NEW == 1 && -z "$NOTEBOOK" ]]; then + echo "No notebook name passed!" + return 1 + fi + if [[ $NEW == 1 ]]; then + mkdir -p $HOME/Notes/$NOTEBOOK + fi + if [[ -z "$NOTEBOOK" ]]; then + pushd $HOME/Notes + vi $(find . -type f) + popd + elif [[ ! -z "$NOTEBOOK" ]]; then + if [[ ! -d "${HOME}/Notes/${NOTEBOOK}" ]]; then + echo "No notebook called "$NOTEBOOK"!" + else + pushd $HOME/Notes/$NOTEBOOK + vi $(find . -type f) + popd + fi + fi +} -- cgit