# ~/.bashrc # vim: ft=bash # shellcheck shell=bash # If not running interactively, don't do anything [[ $- != *i* ]] && return export HISTCONTROL='ignoredups' export HISTFILESIZE=100000 export HISTSIZE=10000 shopt -s histappend shopt -s autocd shopt -s checkwinsize shopt -u promptvars PS1='[\[\e[32m\]\u@\h\[\e[34m\] \W\[\e[00m\]]\$ ' function ls() { command ls --color=auto --indicator-style=classify --human-readable --literal --group-directories-first -v "$@" # -v is for natural sort of numbers within text } # coreutils alias diff='diff --color=auto' alias grep='grep --color=auto' alias cp='cp -riv' alias ll='ls --all -l --human-readable' # -l = long listing format alias l='ls -l' alias mkdir='mkdir -pv' alias mv='mv -iv' alias rm='rm -iv' alias ..='echo "cd .."; cd ..' alias ...='echo "cd ../.."; cd ../..' # program aliases alias m='aerc' alias p='sudo pacman' alias SS='sudo systemctl' alias Su='systemctl --user' alias v='nvim' alias vv='uv run nvim' alias neofetch='fastfetch -c examples/13' alias cvim='nvim -c "cd ~/.config/nvim" -c "Oil"' if [[ -f ~/.config/dir_colors ]]; then eval "$(COLORTERM=1 dircolors -b -- ~/.config/dir_colors)" else eval "$(COLORTERM=1 dircolors -b)" fi export MANPAGER="sh -c 'bat --paging always --theme ansi -p -l man'" # export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat --paging always --theme ansi -p -l man'" # source: https://wiki.archlinux.org/title/GnuPG#Configure_pinentry_to_use_the_correct_TTY GPG_TTY="$(tty)" export GPG_TTY gpg-connect-agent updatestartuptty /bye >/dev/null # shellcheck source=functions.bash source "${XDG_CONFIG_HOME:-$HOME/.config}"/bash/functions.bash # shellcheck source=notes.bash # source "${XDG_CONFIG_HOME:-$HOME/.config}"/bash/notes.bash bind '"\C-o":"\C-ulf\C-m"' # shellcheck source=.config/shellshort/shortcutrc source "${XDG_CONFIG_HOME:-$HOME/.config}"/shellshort/shortcutrc export FZF_DEFAULT_COMMAND='fd --type f --strip-cwd-prefix --hidden --follow --exclude .git' export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" eval "$(fzf --bash)" stty -ixon