linuxbox/bashrc

68 lines
2.1 KiB
Bash

# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
source ~/.local/share/blesh/ble.sh --noattach
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# 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
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
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$//'\'')"'
# # enable programmable completion features (you don't need to enable
# # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# # sources /etc/bash.bashrc).
# 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
PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
alias lz="lazygit"
alias vi="nvim"
alias vim="nvim"
alias ls="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions"
alias lsa="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions -a"
alias lss="eza -1 -l --icons=auto --git-repos --git -h -g --total-size -o --no-permissions -a"
source ~/.fzf.bash
eval "$(zoxide init bash)"
eval "$(starship init bash)"
[[ ! ${BLE_VERSION-} ]] || ble-attach
# TMUX
if [[ ! $TERM =~ tmux ]]; then
if which tmux >/dev/null 2>&1; then
tmux new-session
fi
fi