initial commit

This commit is contained in:
Frank Zechert
2026-07-24 02:44:00 +02:00
commit 181b339296
30 changed files with 3821 additions and 0 deletions
+91
View File
@@ -0,0 +1,91 @@
#!/bin/bash
#
# ~/.bashrc, Frank Zechert, 2026
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# --- History ---
HISTTIMEFORMAT="[%F %T] "
HISTCONTROL="ignoredups"
HISTSIZE="200"
HISTFILESIZE="2000"
shopt -s histappend
# --- Bash Options ---
set -o vi
shopt -s checkwinsize
# --- Pager ---
export PAGER="less"
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
export BAT_THEME="Catppuccin Macchiato"
# for man pages
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
# --- Editor ---
export EDITOR="nvim"
export VISUAL="nvim"
# --- GGC ---
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# --- Bash Completion ---
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
# --- Aliases ---
# nvim
alias vim="nvim"
alias nv="nvim"
alias v="nvim"
# chezmoi
alias chezmoi='chezmoi -S $HOME/Projects/fz-stack/dotfiles'
# ls
alias ls='ls -Fh --color=auto'
alias la='ls -AFh --color=auto'
alias ll='ls -lhga --color=auto'
# grep
alias grep='grep --color=auto'
# interactive mv & rm
alias rm='rm -i'
alias mv='mv -i'
# cat
alias cat='bat'
alias pcat='bat -pp'
# top / htop
alias top='btop'
alias htop='btop'
# ssh
[ "$TERM" = "xterm-kitty" ] && alias kssh="kitty +kitten ssh"
# --- Functions ---
# --- Startup ---
source /usr/share/nvm/init-nvm.sh
# --- Prompt ---
eval "$(starship init bash)"
# --- Welcome ---
if ! command -v figlet >/dev/null 2>&1; then
echo "${BASH} ${BASH_VERSION} on ${HOSTNAME%%.}"
else
figlet "${HOSTNAME%%.}"
fi
echo ""
echo "Welcome ${USER:-$USERNAME}"
# vim: ft=bash