From 147d51a35432a03b6222f8f65196e10802fd911c Mon Sep 17 00:00:00 2001 From: yuzu-eva Date: Tue, 25 Mar 2025 18:47:22 +0100 Subject: added .bashrc, updated aliases, changed EDITOR, installed NERDTree --- .bashrc | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ .config/shell/aliasrc | 3 ++- .config/shell/profile | 5 +++-- .vim/vimrc | 4 ++++ 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .bashrc diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..3b8acc8 --- /dev/null +++ b/.bashrc @@ -0,0 +1,57 @@ +umask 0077 + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +stty start undef + +export PROMPT_DIRTRIM=2 + +PS1="\[\033[1;33m\][\[\033[1;35m\]\u\[\033[1;32m\]@\[\033[1;36m\]\h\[\033[1;37m\]:\[\033[1;33m\]\w]\[\033[0m\] " + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# Enable globbing hidden/dot files (.filename). +shopt -s dotglob + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# enable colors +if [ -f ~/.config/dircolors ]; then + eval "`dircolors -b ~/.config/dircolors`" +fi + + +if [ -f ~/.config/shell/aliasrc ]; then + . ~/.config/shell/aliasrc +fi + +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +# fzf configs +[ -f ~/.local/src/fzf/fzf.bash ] && . ~/.local/src/fzf/fzf.bash +export FZF_DEFAULT_OPS="--extended" +export FZF_DEFAULT_COMMAND="find -type f" +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" + +# NNN +[ -f ~/.config/nnn/nnn.bash ] && . ~/.config/nnn/nnn.bash diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 1edc562..d03d55c 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -50,7 +50,8 @@ alias egrep='egrep --color=auto -i' # ls shortcuts alias ls='ls --color=always --group-directories-first' alias ll='ls -lh' -alias la='ll -A' +alias la='ls -A' +alias lla='ll -A' alias lc='ls | wc -l' # control audio diff --git a/.config/shell/profile b/.config/shell/profile index c7f0ca9..97ac3f0 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -1,5 +1,5 @@ export _JAVA_AWT_WM_NONREPARENTING=1 -export EDITOR="nano" +export EDITOR="vim" export SUDO_EDITOR="nano" export TERMINAL="urxvt" export BROWSER="firefox" @@ -25,6 +25,7 @@ export EIX_LIMIT_COMPACT=0 export LC_ALL=en_US.utf8 export UV_CACHE_DIR="$HOME/.local/share/uv/cache" +export SQLITE_HISTORY="$HOME/.cache/.sqlite_history" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig" @@ -35,4 +36,4 @@ export PATH="$PATH:$HOME/.local/bin:$HOME/.local/src/fzf/bin:$HOME/.npm/bin:/sbi [ -f $HOME/.bashrc ] && . $HOME/.bashrc -[[ -f /etc/motd.tcl ]] && /etc/motd.tcl +[ -f /etc/motd.tcl ] && /etc/motd.tcl diff --git a/.vim/vimrc b/.vim/vimrc index 64957d7..1f4675d 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -22,6 +22,7 @@ call plug#begin() Plug 'dracula/vim', { 'as': 'dracula' } Plug 'tpope/vim-commentary' Plug 'tpope/vim-surround' +Plug 'preservim/nerdtree' call plug#end() @@ -68,6 +69,9 @@ nmap vr :source $MYVIMRC :doautocmd BufRead nnoremap d :cd %:p:h:pwd +nnoremap :NERDTreeToggle +nnoremap n :NERDTreeFocus + map gf :edit nmap x :!xdg-open % -- cgit v1.2.3