65 lines
1.4 KiB
Bash
65 lines
1.4 KiB
Bash
#
|
|
# ~/.bashrc
|
|
#
|
|
|
|
# disable duplicates in command history
|
|
export HISTCONTROL=ignoreboth:erasedups
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
|
|
# unbind shortcuts with ctrl+vim-bindings for navigation in tmux
|
|
#bind -r "\C-h"
|
|
#bind -r "\C-j"
|
|
#bind -r "\C-k"
|
|
#bind -r "\C-l"
|
|
|
|
# define aliases
|
|
alias ls='ls -hal --color=auto'
|
|
alias list='eza -lao --no-permissions --group-directories-first -s=ext --color=always --time-style long-iso'
|
|
|
|
alias grep='grep --color=auto'
|
|
alias rg='rg --no-ignore -i -n -A 1 -B 1 --color=auto -e'
|
|
|
|
alias nano='nano -l'
|
|
|
|
alias dirs='dirs -v'
|
|
|
|
alias bashsource='source ~/.bashrc'
|
|
|
|
## short forms for tmux commands
|
|
alias tma='tmux attach'
|
|
alias trs='tmux rename-session'
|
|
alias trw='tmux rename-window'
|
|
alias tnw='tmux new-window -c "#{pane_current_path}"'
|
|
|
|
# promt config, is overwritten by starship
|
|
PS1='[\u@\h \W]\$ '
|
|
|
|
# overwrite $TERM to avoid problems when connecting to devices via ssh
|
|
export TERM="xterm-256color"
|
|
|
|
# extend PATH variable
|
|
# export PATH=$PATH:~/path/to/add
|
|
|
|
# setup starship
|
|
eval "$(starship init bash)"
|
|
|
|
# setup qmk completion
|
|
# source /home/scbj/repos/qmk_firmware/util/qmk_tab_complete.sh
|
|
|
|
# custom functions for specific purposes
|
|
script_path=~/dotfiles/misc/scripts/
|
|
source "${script_path}"/colors.sh
|
|
source "${script_path}"/dunst.sh
|
|
|
|
# source alias file
|
|
source ~/.bash_alias
|
|
|
|
|
|
# source cargo if available
|
|
cargo_env="~/.cargo/env"
|
|
if [ -f "${cargo_env}" ]; then
|
|
source "${cargo_env}"
|
|
fi
|